On This Page
Refund a Payment
This section describes how to issue a refund. A refund is follow-on request that returns
the payment amount from a completed capture or sale. You must have a capture or sale
transaction ID.
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 Refunding a Payment
Required Fields for an Ancillary Purchase
Include these fields, in addition to the above fields, if there is an ancillary
purchase:
- Include one of the possible values listed in the Ancillary Service Category Codes section.
- To send multiple category codes, you must include additional entries of this field in the array.
Card-Specific Field for Processing Airline Refund
Certain card types require additional fields.
Diners Club
Use this field in addition to the required fields to capture an airline
authorization when using a Diners Club card.
Optional Fields for Refunding a Payment
- Set to one of these possible values:
- A: Passenger transport ancillary fee cancellation
- B: Airline ticket and passenger transport ancillary fee cancellation
- C: Airline ticket cancellation
- O: Other
- P: Partial refund of airline ticket
- For a list of all possible values, see Ancillary Service Category Codes.
- For a list of all possible values, see Ancillary Service Category Codes.
Example: Refunding a Payment
Request
{ "processingInformation": { "industryDataType": "airline" }, "orderInformation": { "amountDetails": { "totalAmount": "102.21" } } }
Response to a Successful Request
{ "_links": { "void": { "method": "POST", "href": "/pts/v2/refunds/6805496388936342404953/voids" }, "self": { "method": "GET", "href": "/pts/v2/refunds/6805496388936342404953" } }, "clientReferenceInformation": { "code": "1680549638986" }, "id": "6805496388936342404953", "orderInformation": { "amountDetails": { "currency": "USD" } }, "processorInformation": { "approvalCode": "888888", "responseCode": "100" }, "reconciliationId": "712678686G0ONA52", "refundAmountDetails": { "currency": "USD", "refundAmount": "102.21" }, "status": "PENDING", "submitTimeUtc": "2023-04-03T19:20:39Z" }
Example: Refunding a Payment with Ancillary Purchase
Request
{ "clientReferenceInformation": { "code": "TC50171_3" }, "orderInformation": { "amountDetails": { "totalAmount": "102.21", "currency": "USD" } }, "travelInformation": { "transit": { "airline": { "ancillaryInformation": { "ticketNumber": "123456789123456", "passengerName": "John Smith", "connectedTicketNumber": "987654321987654", "service": [ { "categoryCode": "1" } ] } } } } }
Response to a Successful Request
{ "_links": { "void": { "method": "POST", "href": "/pts/v2/refunds/6805496388936342404953/voids" }, "self": { "method": "GET", "href": "/pts/v2/refunds/6805496388936342404953" } }, "clientReferenceInformation": { "code": "TC50171_3" }, "id": "6805496388936342404953", "orderInformation": { "amountDetails": { "currency": "USD" } }, "processorInformation": { "approvalCode": "888888", "responseCode": "100" }, "reconciliationId": "712678686G0ONA52", "refundAmountDetails": { "currency": "USD", "refundAmount": "102.21" }, "status": "PENDING", "submitTimeUtc": "2023-04-03T19:20:39Z" }