Orders

Cancel order

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.

Authorization

Public key Secret key
x-fngs-public-key<token>

In: header

x-fngs-secret-key<token>

In: header

Path Parameters

orderIdOrNumber*|

PATCH /v0/orders/:orderIdOrNumber/cancel Parameter

Request Body

application/json

PATCH /v0/orders/:orderIdOrNumber/cancel Request body

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

PATCH
/v0/orders/{orderIdOrNumber}/cancel
curl -X PATCH "https://example.com/v0/orders/497f6eca-6276-4993-bfeb-53cbbbba6f08/cancel" \  -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"    }  }}