Update order
Modify an existing order's details. Can update status, value, fee, tax, and currency. Requires write access. Note: Use with caution as this directly modifies order records. For most cases, use the refund or cancel endpoints instead.
Authorization
Public key Secret key In: header
In: header
Path Parameters
PATCH /v0/orders/:orderIdOrNumber/update Parameter
Request Body
application/json
PATCH /v0/orders/:orderIdOrNumber/update Request body
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
curl -X PATCH "https://example.com/v0/orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/update" \ -H "Content-Type: application/json" \ -d '{}'{ "status": "success", "data": { "order": { "object": "order", "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08", "number": "string", "status": "PENDING", "value": 0, "tax": 0, "fee": 0, "totalItems": 0, "country": null, "currency": "AFN", "currencyDecimals": null, "createdAt": 0, "userId": null, "user": null, "lastPaymentId": null, "lastPaymentNumber": null, "lastPayment": null, "subscriptionId": null, "subscription": null, "checkoutId": null, "orderNumber": "string" } }}Get order details GET
Retrieve detailed information about a specific order by its ID or order number. Returns the full order object including associated user, cart items, subscription (if applicable), and payment details. For subscription orders, also returns the current subscription status.
Cancel order PATCH
Cancel a specific order by changing its status to CANCELLED. This action does not automatically process refunds. To refund a paid order, use the refund endpoint or process through your payment provider. Requires write access.