Refund, void, or capture an order
curl -X PUT "https://test-fep.kashier.io/v3/orders/string" \ -H "Content-Type: application/json" \ -d '{ "apiOperation": "REFUND", "reason": "any reason", "transaction": { "amount": 3 } }'{ "response": { "status": "SUCCESS", "gatewayCode": "APPROVED", "gatewayMessage": "Payment accepted", "transactionResponseCode": "00", "transactionResponseMessage": { "en": "Approved", "ar": "تمت الموافقة" }, "transactionId": "TX-XXXXXXXXXX", "transactionDate": "2022-04-13 10:44:46.724000+00:00", "settlementDate": "2022-04-13", "amount": 10, "currency": "EGP", "operation": "refund", "creationDate": "2022-04-13 10:44:46.724000+00:00", "orderReference": "TEST-ORD-XXXXXXXXX" }, "messages": { "en": "Congratulations! Your refund was successful", "ar": "تهانينا! تمت معاملة استرداد الأموال بنجاح" }, "status": "SUCCESS"}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. The refund amount must not exceed the amount of the original transaction. Refunds use your available Kashier balance (pending balance excluded). Refund statuses: SUCCESS (processed by the processor), FAILURE (cannot be processed; your account is credited with the refund amount), PENDING (initiated, waiting for the processor).
- VOID — cancel the order's transaction amount fully or partially. You can cancel a pay, refund, authorize, or capture transaction; pass the targetTransactionId returned in a previous response.
- CAPTURE — capture a previously authorized amount fully or partially. You should capture the amount before 7 or 30 days depending on your configuration. The Authorization Capture feature must be enabled by contacting your account manager or customer success. Releasing an authorized amount back to the customer is done with the VOID operation.
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 Order Id
Request Body
application/json
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
Export transaction batches GET
Exports transaction data based on specific filters such as status and date range. It's typically used for reporting, reconciliation, and data analysis by aggregators or merchants. The export is del…
Refund an order PUT
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 Authoriz…