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 Your secret key from the Kashier dashboard. Send the raw key value in the Authorization header, without a Bearer prefix.
In: header
Path Parameters
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
Refund, void, or capture an order PUT
Performs an operation against an existing order, selected by the apiOperation field in the body: - REFUND — repay your customer in part or fully. For partial refunds pass an amount in transaction.…
Void an order PUT
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 targetTra…