Refund
China UnionPayREST API
This section describes how to process a refund. A refund is linked to a capture or sale.
You must request a refund within 180 days of the authorization.
For
China UnionPay
, use the refund service to reverse pre-authorization completions and sales.Endpoint
Production:
POST
https://api.cybersource.com
/pts/v2/payments/{id}
/refundsTest:
POST
https://apitest.cybersource.com
/pts/v2/payments/{id}
/refundsThe is the transaction ID
returned in the capture or sale response.
{id}
Required Fields for a Mass Transit Refund
REST Example: Refunding a Capture
Request
123456789{"clientReferenceInformation": { "code": "FE56907" }, "orderInformation": { "amountDetails": { "totalAmount": "200", "currency": "THB" } }}
Response to a Successful Request
12345678910111213141516171819202122232425262728293031{"_links": { "void": { "method": "POST", "href": "/pts/v2/refunds/7025605918856084604951/voids" }, "self": { "method": "GET", "href": "/pts/v2/refunds/7025605918856084604951" } }, "clientReferenceInformation": { "code": "FE56907" }, "id": "7025605918856084604951", "orderInformation": { "amountDetails": { "currency": "THB" } }, "processorInformation": { "approvalCode": "831000" "retrievalReferenceNumber": "334813163319", "responseCode": "00" }, "reconciliationId": "7025605722066080204951", "refundAmountDetails": { "currency": "THB", "refundAmount": "200" }, "status": "PENDING", "submitTimeUtc": "2022-04-18T12:28:23Z",}
Response to a Failed Request for Refund When a Refund is Not Allowed for First Ride
Risk
12345{"id": "7078037920207111957011", "submitTimeUtc": "2024-02-13T05:56:33Z", "status": "INVALID_REQUEST", "reason": "INVALID_DATA", "message": "Decline - The referenced request id is invalid for all follow-on transactions."}