REST API | Visa Platform Connect

REST Example: Reverse a PIN Debit Purchase or Credit

Endpoint

Production:
POST
https://api.cybersource.com
/pts/v2/payments/
{id}
/voids
Test:
POST
https://apitest.cybersource.com
/pts/v2/payments/
{id}
/voids
The
{id}
is the transaction ID returned in the purchase response.
Request
{ "clientReferenceInformation": { "code": "ABC1234", "transactionId": "2759375893", "partner": { "thirdPartyCertificationNumber": "PTP1234" } }, "orderInformation": { "amountDetails": { "totalAmount": "202.00", "currency": "USD" } }, "paymentInformation": { "paymentType": { "name": "CARD", "subTypeName": "DEBIT" }, "card": { "useAs": "", "sourceAccountType": "UA" } } }
Response to a Successful Request
{     "_links": {         "self": {             "method": "GET",             "href": "/pts/v2/payments/6869126948216005803117"         }     },     "clientReferenceInformation": {         "code": "ABC1234",         "transactionId": "2759375893"     },     "id": "6869126948216005803117",     "orderInformation": {         "amountDetails": {             "currency": "usd"         }     },     "processorInformation": {         "retrievalReferenceNumber": "123456827618",         "responseCode": "00"     },     "reconciliationId": "6869126890096005703117",     "status": "REVERSED",     "submitTimeUtc": "2023-06-16T10:51:35Z",     "voidAmountDetails": {         "currency": "usd",         "voidAmount": "202.00"     } }