List

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

HTTP-message

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

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

Response codes

Code Status Info
200 Ok The call was successful. The requested resource will be returned in the response body.
400 Bad request The call failed. Look at the returned JSON-object for more information.
401 Unauthorized The authorization failed. Check the authorization field in the header.

Request

GET https://api.payson.se/2.0/Checkouts?status=PaidToAccount 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: 6171

{
“pageSize”: 20,
“page”: 1,
“totalPages”: 1,
“count”: 2,
“totalCount”: 2,
“data”: [
{
“status”: “paidToAccount”,
“id”: “a9e48054-20ab-49e6-84f1-a53d00b1a905”,
“snippet”: “<iframe id=’checkoutIframe’ name=’checkoutIframe’ src=’http://embedded.payson.se/checkout?id=a9e48054-20ab-49e6-84f1-a53d00b1a905′ style=’width:100%; height: 100%’ frameborder=’0′ scrolling=’no’></iframe>”,
“customer”: {
“city”: “Stan”,
“country”: “SE”,
“identityNumber”: “4605092222”,
“email”: “tester@subdomain.se”,
“firstName”: “Tess T”,
“lastName”: “Persson”,
“postalCode”: “99999”,
“street”: “Testgatan 1”,
“type”: “person”
},
“order”: {
“currency”: “sek”,
“totalPriceExcludingTax”: 315,
“totalPriceIncludingTax”: 315,
“totalTaxAmount”: 0,
“billingPeriod”: “once”,
“items”: [
{
“itemId”: “02c5d0cd-cdf8-46d6-a6eb-a53d00b1a92b”,
“discountRate”: 0,
“name”: “Test”,
“quantity”: 3,
“reference”: “123”,
“taxRate”: 0,
“totalPriceExcludingTax”: 300,
“totalPriceIncludingTax”: 300,
“totalTaxAmount”: 0,
“creditedAmount”: 0,
“type”: “physical”,
“unitPrice”: 100
},
{
“itemId”: “9ecee780-43ab-4355-b4fb-a53d00b1a92b”,
“discountRate”: 0,
“name”: “Flat Rate – Fixed”,
“quantity”: 1,
“reference”: “flatrate_flatrate”,
“taxRate”: 0,
“totalPriceExcludingTax”: 15,
“totalPriceIncludingTax”: 15,
“totalTaxAmount”: 0,
“creditedAmount”: 0,
“type”: “physical”,
“unitPrice”: 15
}
]
},
“merchant”: {
“checkoutUri”: “http://www.adress.xyz/Checkout?id=123”,
“confirmationUri”: “http://www.adress.xyz/Confirmation?id=123”,
“notificationUri”: “http://www.addres.xyz/Notification?id=123”,
“termsUri”: “http://www.addres.xyz/Terms”
},
“gui”: {
“colorScheme”: “white”,
“locale”: “SE”,
“verfication”: “none”,
“requestPhone”: false
},
“history”: {
“created”: “2015-10-26T10:46:50”,
“paidToAccount”: “2015-10-26T11:32:36”
},
“links”: [
{
“href”: “https://api.payson.se/2.0/Checkouts/a9e48054-20ab-49e6-84f1-a53d00b1a905”,
“rel”: “self”
}
]
},
{
“status”: “paidToAccount”,
“id”: “cadacbda-3990-4ef2-8993-a53d00bcfda7”,
“snippet”: “<iframe id=’checkoutIframe’ name=’checkoutIframe’ src=’http://embedded.payson.se/checkout?id=cadacbda-3990-4ef2-8993-a53d00bcfda7′ style=’width:100%; height: 100%’ frameborder=’0′ scrolling=’no’></iframe>”,
“customer”: {
“city”: “Stan”,
“country”: “SE”,
“identityNumber”: “4608142222”,
“email”: “testperson@payson.se”,
“firstName”: “Persson, Tess T”,
“lastName”: “”,
“phone”: “123”,
“postalCode”: “99999”,
“street”: “Testgatan 1”,
“type”: “business”
},
“order”: {
“currency”: “sek”,
“totalPriceExcludingTax”: 280,
“totalPriceIncludingTax”: 390,
“totalTaxAmount”: 110,
“billingPeriod”: “once”,
“items”: [
{
“itemId”: “b5ee79e4-932c-4e59-8ee9-a53d00bcfda7”,
“discountRate”: 0,
“name”: “TestItem2”,
“quantity”: 3,
“reference”: “R102”,
“taxRate”: 0.4,
“totalPriceExcludingTax”: 90,
“totalPriceIncludingTax”: 150,
“totalTaxAmount”: 60,
“creditedAmount”: 0,
“type”: “physical”,
“unitPrice”: 50
},
{
“itemId”: “dfb7b8cd-eb19-468d-99bc-a53d00bcfda7”,
“discountRate”: 0,
“name”: “TestFee”,
“quantity”: 1,
“reference”: “F001”,
“taxRate”: 0.25,
“totalPriceExcludingTax”: 75,
“totalPriceIncludingTax”: 100,
“totalTaxAmount”: 25,
“creditedAmount”: 0,
“type”: “fee”,
“unitPrice”: 100
},
{
“itemId”: “2ae9164f-95b0-414d-af18-a53d00bcfda7”,
“discountRate”: 0.5,
“name”: “TestItem1”,
“quantity”: 1,
“reference”: “R101”,
“taxRate”: 0.25,
“totalPriceExcludingTax”: 75,
“totalPriceIncludingTax”: 100,
“totalTaxAmount”: 25,
“creditedAmount”: 0,
“type”: “physical”,
“unitPrice”: 100
},
{
“itemId”: “ffe03a79-5ade-467c-b1fb-a53d00bcfda7”,
“discountRate”: 0,
“name”: “TestItem3”,
“quantity”: 2,
“reference”: “R103”,
“taxRate”: 0,
“totalPriceExcludingTax”: 40,
“totalPriceIncludingTax”: 40,
“totalTaxAmount”: 0,
“creditedAmount”: 0,
“type”: “physical”,
“unitPrice”: 20
}
]
},
“merchant”: {
“checkoutUri”: “http://www.adress.xyz/Checkout?id=123”,
“confirmationUri”: “http://www.adress.xyz/Confirmation?id=123”,
“notificationUri”: “http://www.addres.xyz/Notification?id=123”,
“termsUri”: “http://www.addres.xyz/Terms”
},
“gui”: {
“colorScheme”: “white”,
“locale”: “sv”,
“verfication”: “none”,
“requestPhone”: true
},
“history”: {
“created”: “2015-10-26T11:28:05”,
“formsFilled”: “2015-10-26T11:29:09”,
“paidToAccount”: “2015-10-26T11:35:51”
},
“links”: [
{
“href”: “https://api.payson.se/2.0/Checkouts/cadacbda-3990-4ef2-8993-a53d00bcfda7”,
“rel”: “self”
}
]
},
],
“links”: [
{
“href”: “https://api.payson.se/2.0/Checkouts?merchantId=6368&page=1&status=PaidToAccount”,
“rel”: “self”
}
]
}