On This Page
Update an Order
You can update the information in an order, such as the payment details and line items,
by requesting an update order. Updating an order is necessary when a customer decides to
change their purchase, billing, or shipping information, and when inventory adjustments
occur.
Include all of the customer's information sent in the create order request in the update
order request to ensure the order's accuracy. Only exclude fields that relate to
information you are intentionally removing from an order.
IMPORTANT
You cannot update an order after an authorization or
sale is complete.
Endpoints
Production:
PATCH
https://api.cybersource.com
/pts/v2/intents/{id}
Test:
PATCH
https://apitest.cybersource.com
/pts/v2/intents/{id}
Set the to the order ID
contained in the create order response.
{id}
Required Fields for Updating an Order
- orderInformation.amountDetails.insuranceAmount
- orderInformation.amountDetails.shippingAmount
- orderInformation.amountDetails.shippingDiscountAmount
- orderInformation.amountDetails.taxDetails.taxId
- orderInformation.amountDetails.taxDetails.type
- Set to one of these values:
- payPal: the PayPal payment method.
- venmo: the Venmo payment method.
- Set toeWallet.
- Set toAP_UPDATE_ORDER.
Optional Fields for Updating an Order
- orderInformation.invoiceDetails.productDescription
Example: Updating an Order
Request
{ "orderInformation": { "shipTo": { "country": "PL", "address1": "I", "address2": "I", "locality": "I", "administrativeArea": "I", "postalCode": "I" }, "amountDetails": { "totalAmount": "65", "currency": "USD", "taxAmount": "20", "shippingAmount": "15", "dutyAmount": "5", "insuranceAmount": "15", "shippingDiscountAmount": "5", "discountAmount": "5", "taxDetails": { "taxId": "123456", "type": "BR_CPF" } }, "lineItems": [ { "productName": "test-product", "quantity": 1, "productDescription": "description-123", "unitPrice": "20", "taxAmount": "20", "totalAmount": "20", "typeOfSupply": "01" } ] }, "processingInformation": { "actionList": [ "AP_UPDATE_ORDER" ] }, "paymentInformation": { "paymentType": { "method": { "name": "payPal" }, "name": "eWallet" } } }
Response to a Successful Request
{ "message": "Successful", "status": "COMPLETED", "id": "7259607420486012601991", "submitTimeUtc": "2024-09-10T09:32:22Z" }
Response Statuses for Updating an Order
Cybersource
responds to your request with one of these statuses in
the status
field:- COMPLETED: The request was successful and the order information is updated.
- INVALID_REQUEST: The request was not successful. Send a new update order request.