KashierDevelopersKashier Developers

Void an order

curl -X PUT "https://test-api.kashier.io/v3/payment/void/string" \  -H "Content-Type: application/json" \  -d '{    "apiOperation": "VOID",    "transaction": {      "amount": 3,      "targetTransactionId": "TX-XXXXXXXXXX"    }  }'
{  "response": {},  "transactionId": "string",  "messages": {    "en": "string",    "ar": "string"  },  "status": "string"}

Cancels a transaction on the order before it settles — the clean undo while the money has not actually moved yet. Use it to cancel a pay, an authorization, a capture or a refund; pass the targetTransactionId you got back from the transaction you are cancelling. Once the transaction has settled, void no longer applies and you need a refund instead.

The same operation as PUT /v3/orders/{orderId} with apiOperation: VOID.

Send your secret key in the Authorization header. Like refund, this requires the Transactions Write permission on the key.

Authorization

secretKey
Authorization<token>

Your secret key from the Kashier dashboard. Send the raw key value in the Authorization header, without a Bearer prefix.

In: header

Path Parameters

orderId*string

Kashier's order id.

Request Body

application/json

The request body for a void.

TypeScript Definitions

Use the request body type in TypeScript.

Void (cancel) a transaction of the order, fully or partially.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

PUT
/v3/payment/void/{orderId}