KashierDevelopersKashier Developers

Refund an order

curl -X PUT "https://test-api.kashier.io/v3/payment/refund/string" \  -H "Content-Type: application/json" \  -d '{    "apiOperation": "REFUND",    "reason": "Customer returned one item",    "transaction": {      "amount": 3    }  }'
{  "response": {},  "transactionId": "string",  "messages": {    "en": "string",    "ar": "string"  },  "status": "string"}

Repays your customer, in part or in full, from your available Kashier balance.

This is the same operation as PUT /v3/orders/{orderId} with apiOperation: REFUND.

Send your secret key in the Authorization header. The key must hold the Transactions Write permission.

Refund outcomes: SUCCESS (the processor took it), PENDING (initiated, waiting on the processor), FAILURE (it could not be processed, and your account is credited back the refund amount). A refund cannot exceed the original transaction amount, and it draws on your available balance — pending balance does not count.

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 refund.

TypeScript Definitions

Use the request body type in TypeScript.

Refund an order (partially or fully). Refunds use your available Kashier balance.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

PUT
/v3/payment/refund/{orderId}