Refunds
Refunds
EFTPOSREST API
This section provides the information you need in order to process a
refund
, which is linked to a capture or
sale.
When your account is enabled for credit authorizations, also known as
purchase return authorizations,
Cybersource
authenticates the card and
customer during a refund or
credit request.
Every
credit request is automatically authorized.
Credit authorization results are returned in these
response fields:
- processorInformation.approvalCode
- processorInformation.networkTransactionId
- processorInformation.responseCode
When you request a void for the credit and the credit is voided. If your account is enabled
for credit authorizations, the credit authorization is also reversed.
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 Processing a Refund
Refund
Use these required fields for processing a
refund
.- clientReferenceInformation.applicationUser
- Set the value toeftPOS.
- Set the value toeftPOS.
- Set the value toCNP.
- Set the value tointernet.
Related Information
REST Interactive Example: Processing a Refund
Refund a Payment
Live Console URL: index.html#payments_refund_refund-a-payment
REST Example: Processing a Refund
Request
123456789101112131415161718192021222324252627282930313233343536373839404142{"clientReferenceInformation": { "code": "Refund_A61_120", "transactionId": "43993734", "partner": { "developerId": "eftPOS", "solutionId": "CNP" }, "applicationUser": "eftPOS" }, "processingInformation": { "commerceIndicator": "internet", "reconciliationId": "222222" }, "orderInformation": { "billTo": { "country": "AU", "lastName": "VDP", "address2": "Address 2", "address1": "123 Collins St", "postalCode": "3000", "locality": "Melbourne", "administrativeArea": "VI", "firstName": "CYBS", "phoneNumber": "3-9657-1234", "district": "VI", "buildingNumber": "123", "company": "Visa", "email": "test@cybs.com" }, "amountDetails": { "totalAmount": "297.00", "currency": "aud" } }, "paymentInformation": { "card": { "expirationYear": "2025", "number": "4687380100010006", "expirationMonth": "12", "type": "070" } }}
Response to a Successful Request
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950{"_links": { "void": { "method": "POST", "href": "/pts/v2/credits/7089501301866586603091/voids" }, "self": { "method": "GET", "href": "/pts/v2/credits/7089501301866586603091" } }, "clientReferenceInformation": { "code": "Refund_A61_120", "partner": { "developerId": "eftPOS", "solutionId": "CNP" }, "transactionId": "43993734" }, "creditAmountDetails": { "currency": "aud", "creditAmount": "297.00" }, "id": "7089501301866586603091", "orderInformation": { "amountDetails": { "currency": "aud" } }, "paymentAccountInformation": { "card": { "type": "070" } }, "paymentInformation": { "tokenizedCard": { "type": "070" }, "card": { "type": "070" } }, "processorInformation": { "systemTraceAuditNumber": "009802", "retrievalReferenceNumber": "222222", "settlementDate": "0227", "responseCode": "00" }, "reconciliationId": "222222", "status": "PENDING", "submitTimeUtc": "2024-02-26T12:22:10Z"}