Refunds¶
A refund is made against a payment order, the record of the actual payment at the provider, not against the transaction. Refunds are processed asynchronously and accept any key type.
Find the payment order¶
POST /payment/get-all with { "transactionIds": ["<transaction id>"] }. A paid transaction has at least one order; its id is the paymentOrderId you refund. The order also carries the payer as reported by the provider (payerName, payerFinancialAccountId, payerBankName).
Request a refund¶
POST /payment/refund
{
"paymentOrderId": "e7d6c5b4-a392-4817-9f6e-5d4c3b2a1908",
"amount": 50000,
"reason": "Customer returned part of the order",
"idempotencyKey": "9a8b7c6d-5e4f-4a3b-8c2d-1e0f9a8b7c6d"
}
| Field | Required | Notes |
|---|---|---|
paymentOrderId |
yes | Must belong to your merchant |
amount |
no | Minor units. Omit it to refund the full order. Partial refunds work only where the provider supports them. |
reason |
no | ≤ 500 characters |
idempotencyKey |
recommended | UUID v4. The same key on the same order returns the order without a second refund. |
The answer (200) is the payment order as it was before the refund. Payard then creates a payment operation with type: REFUND and sends it to the provider.
Check before you call. Refund only payment orders of paid transactions, and keep the total refunded per order within the order amount.
Track the refund¶
POST /payment/operation/get-allwith{ "orderIds": ["<paymentOrderId>"], "types": ["REFUND"] }shows the refund operation and itsstatus.GET /payment/get-one/:idshows the order'sstatus(IN_REFUND,REFUNDED,PARTIALLY_REFUNDED),reversalAmountandreversalScope.- The
REFUND_STATUS_CHANGEDwebhook is sent for providers that report refund progress to Payard; Payard tells you which of your providers do. For the others, poll.
A refund to a provider configuration that does not support refunds fails with PAYMENT_OPERATION_FAILED (400).