Read

View latest version »

This method is used to get a checkout resource. The response body of a successful call will contain the JSON-representation of a checkout-resource.

HTTP-message

Request Response
Header
  • Content-Type: application/json;
Body
Checkout-resource

The test URI is https://test-api.payson.se/2.0/Checkouts/{id}

Response codes

Code Status Info
200 Ok The call was successful. The requested resource will be returned in the response body.
401 Unauthorized The authorization failed. Check the authorization field in the header.
404 Not found The requested checkout resource was not found.

Request

GET https://api.payson.se/2.0/Checkouts/264d3bfd-f7a1-4122-8556-a56700f71eaa HTTP/1.1
Host: api.payson.se
Accept: application/json
Authorization: Basic MTIzNDpkYzE1NzE4Mi1lMjVhLTQwMDgtYmQwOS05MDNkZjM0MjhkYjQ=

Response

HTTP/1.1 200 OK
Content-Type: application/json; charset=utf-8
Content-Length: 1435

{
“status”: “created”,
“id”: “264d3bfd-f7a1-4122-8556-a56700f71eaa”,
“snippet”: “<iframe id=’checkoutIframe’ name=’checkoutIframe’
src=’http://embedded.payson.se/checkout?id=264d3bfd-f7a1-4122-8556-a56700f71eaa’
style=’width:100%; height: 100%’ frameborder=’0′ scrolling=’no’></iframe>”,
“customer”: {
“type”: “person”
},
“order”: {
“currency”: “sek”,
“totalPriceExcludingTax”: 172.5,
“totalPriceIncludingTax”: 250,
“totalTaxAmount”: 77.5,
“items”: [
{
“itemId”: “c363d219-191e-41df-a502-a56700f71eb6”,
“discountRate”: 0,
“name”: “TestItem1”,
“quantity”: 1,
“taxRate”: 0.4,
“totalPriceExcludingTax”: 60,
“totalPriceIncludingTax”: 100,
“totalTaxAmount”: 40,
“creditedAmount”: 0,
“type”: “physical”,
“unitPrice”: 100
},
{
“itemId”: “1489c744-7acd-4ed8-b839-a56700f71eb6”,
“discountRate”: 0,
“name”: “TestItem2”,
“quantity”: 3,
“taxRate”: 0.25,
“totalPriceExcludingTax”: 112.5,
“totalPriceIncludingTax”: 150,
“totalTaxAmount”: 37.5,
“creditedAmount”: 0,
“type”: “physical”,
“unitPrice”: 50
}
]
},
“merchant”: {
“checkoutUri”: “http://www.adress.xyz/Checkout?id=123”,
“confirmationUri”: “http://www.adress.xyz/Confirmation?id=123”,
“partnerId”: 0,
“notificationUri”: “http://www.addres.xyz/Notification?id=123”,
“termsUri”: “http://www.addres.xyz/Terms”
},
“gui”: {
“colorScheme”: “blue”,
“locale”: “en”,
“verfication”: “none”,
“requestPhone”: false
},
“history”: {
“created”: “2015-12-07T14:59:44”
},
“links”: [
{
“href”: “https://api.payson.se/2.0/Checkouts/264d3bfd-f7a1-4122-8556-a56700f71eaa”,
“rel”: “self”
}
]
}