external-payments

Refund a successful payment, fully or partially

post/v1/payments/{refNo}/refund

Path parameters

refNostring required
Example:RP1757150000000A1B2

Request body

amountstring

Amount to refund. Omit for the full remaining balance.

reasonstring

Free-text reason, stored in the ledger only.

Example request

{
  "amount": "10.00",
  "reason": "Customer request"
}

Response

refNostring required
clientReferencestring
gatewaystring required
status'pending' | 'processing' | 'success' | 'failed' | 'cancelled' | 'refunded' | 'expired' required
amountstring required
currencystring required
descriptionstring required
paymentUrlstring

Send the customer here. Present while the payment can still be paid.

returnUrlstring required
gatewayTransactionIdstring
bankReferencestring
responseCodestring

Raw gateway result code (RevPay Appendix C)

errorDescriptionstring
paymentMethodstring

RevPay Payment_ID actually used

refundedAmountstring required
createdAtstring date-time required
completedAtstring date-time

Example response

{
  "refNo": "RP1757150000000A1B2",
  "clientReference": "INV-1001",
  "gateway": "revpay",
  "amount": "52.40",
  "currency": "MYR",
  "description": "Order #1001",
  "refundedAmount": "0.00"
}

Changes

Changed in 1 of the 4 revisions of this API.1