Menu

REST Example: Processing a Merchant-Initiated Credit Void

Endpoint:
  • Production:
    POST
    https://api.cybersource.com
    /pts/v2/credits/
    {id}
    /voids
  • Test:
    POST
    https://apitest.cybersource.com
    /pts/v2/credits/
    {id}
    /voids
For this example, the
{id}
portion of the URL is set to the transaction ID included in the credit request you want to void:
6541933390746728203005
IMPORTANT
POST requests for voids require a body. If you have no fields to pass, use empty braces as shown below.
Request
{ }
Response for a Successful Request
The response for a successful credit void contains the value
VOIDED
in the
status
field.
{ "_links": { "self": { "method": "GET", "href": "/pts/v2/voids/6541933390746728203005" } }, "clientReferenceInformation": { "code": "1654193339056" }, "id": "6541933390746728203005", "orderInformation": { "amountDetails": { "currency": "USD" } }, "status": "VOIDED", "submitTimeUtc": "2023-06-02T18:08:59Z", "voidAmountDetails": { "currency": "usd", "voidAmount": "100.00" } }
Back to top