Update

View latest version »

This method is used to update an existing checkout resource. The body of a create method call contains the  JSON-representation of the updated checkout-resource.

HTTP-message

Request Response
Header
  • Location: URI to Checkout-resource
Body
Checkout-resource  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.
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

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

{
“id”: “264d3bfd-f7a1-4122-8556-a56700f71eaa”,
“order”: {
“currency”: “sek”,
“items”: [
{
“name”: “TestItem1”,
“quantity”: 2,
“taxRate”: 0.4,
“unitPrice”: 100
},
{
“name”: “TestItem2”,
“quantity”: 2,
“taxRate”: 0.25,
“unitPrice”: 50
}
]
},
“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”
}
}

Response

HTTP/1.1 200 OK
Location: https://api.payson.se/2.0/Checkouts/264d3bfd-f7a1-4122-8556-a56700f71eaa
Content-Length: 0