CheckoutUtility

Updates the order for PayPal Express Checkout

POST
/paypal/updateOrder

Updates the order for PayPal Express Checkout. This can be used to update the PayPal lightbox with an updated amount and delivery methods based on the delivery address.

Authorization

AuthorizationBasic <token>

In: header

Header Parameters

Idempotency-Key?string

A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).

Request Body

application/json

amount?
deliveryMethods?array<>

The list of new delivery methods and the cost of each.

paymentData?string

The paymentData from the client side. This value changes every time you make a /paypal/updateOrder request.

pspReference?string

The original pspReference from the /payments response.

sessionId?string

The original sessionId from the /sessions response.

taxTotal?

Total tax amount from the order.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/paypal/updateOrder" \  -H "Idempotency-Key: 37ca9c97-d1d1-4c62-89e8-706891a563ed" \  -H "Content-Type: application/json" \  -d '{    "pspReference": "DZ4DPSHB4WD2WN82",    "paymentData": "po7XZ...",    "amount": {      "currency": "EUR",      "value": 12000    },    "deliveryMethods": [      {        "reference": "1",        "description": "Express Shipping",        "type": "Shipping",        "amount": {          "currency": "EUR",          "value": 1000        },        "selected": true      },      {        "reference": "2",        "description": "Standard Ground",        "type": "Shipping",        "amount": {          "currency": "EUR",          "value": 500        },        "selected": false      }    ]  }'

{  "paymentData": "po7XZ...",  "status": "success"}