Sample - Adyen Checkout API
POST/paypal/updateOrder

Updates the order for PayPal Express Checkout

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.

  • RetriesRetries up to 2×, 500ms backoff, 30s timeout.
  • IdempotentThe SDK sends Idempotency-Key, so a retried request is only applied once.

1 parameter · 9 body fields
Idempotency-Keystringoptional
A unique identifier for the message with a maximum of 64 characters (we recommend a UUID).
amountobjectoptional
The updated final payment amount. This amount is the item total plus the shipping costs of the selected `deliveryMethod`.
deliveryAddressobjectoptional
The delivery address for this order.
deliveryMethodsarray<object>optional
The list of new delivery methods and the cost of each.
discountAmountobjectoptional
The discount amount for this order.
paymentDatastringoptional
The `paymentData` from the client side. This value changes every time you make a `/paypal/updateOrder` request.
pspReferencestringoptional
The original `pspReference` from the `/payments` response.
sessionIdstringoptional
The original `sessionId` from the `/sessions` response.
shippingAmountobjectoptional
The shipping amount for this order.
taxTotalobjectoptional
Total tax amount from the order.

6 status codes
200OK - the request has succeeded.
paymentDatastringrequired
The updated paymentData.
statusstringrequired
The status of the request. This indicates whether the order was successfully updated with PayPal.
Allowed:errorsuccess
400Bad Request - a problem reading or understanding the request.
additionalDataobjectoptional
Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
errorCodestringoptional
The error code mapped to the error message.
errorTypestringoptional
The category of the error.
messagestringoptional
A short explanation of the issue.
pspReferencestringoptional
The PSP reference of the payment.
statusintegeroptional
The HTTP response status.
401Unauthorized - authentication required.
additionalDataobjectoptional
Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
errorCodestringoptional
The error code mapped to the error message.
errorTypestringoptional
The category of the error.
messagestringoptional
A short explanation of the issue.
pspReferencestringoptional
The PSP reference of the payment.
statusintegeroptional
The HTTP response status.
403Forbidden - insufficient permissions to process the request.
additionalDataobjectoptional
Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
errorCodestringoptional
The error code mapped to the error message.
errorTypestringoptional
The category of the error.
messagestringoptional
A short explanation of the issue.
pspReferencestringoptional
The PSP reference of the payment.
statusintegeroptional
The HTTP response status.
422Unprocessable Entity - a request validation error.
additionalDataobjectoptional
Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
errorCodestringoptional
The error code mapped to the error message.
errorTypestringoptional
The category of the error.
messagestringoptional
A short explanation of the issue.
pspReferencestringoptional
The PSP reference of the payment.
statusintegeroptional
The HTTP response status.
500Internal Server Error - the server could not process the request.
additionalDataobjectoptional
Contains additional information about the payment. Some data fields are included only if you select them first. Go to **Customer Area** > **Developers** > **Additional data**.
errorCodestringoptional
The error code mapped to the error message.
errorTypestringoptional
The category of the error.
messagestringoptional
A short explanation of the issue.
pspReferencestringoptional
The PSP reference of the payment.
statusintegeroptional
The HTTP response status.

Error handling

A 400 is returned: Bad Request - a problem reading or understanding the request. A 401 is returned: Unauthorized - authentication required. A 403 is returned: Forbidden - insufficient permissions to process the request. A 422 is returned: Unprocessable Entity - a request validation error. A 500 is returned: Internal Server Error - the server could not process the request.