Reverse a PIN Debit Purchase or Credit {#pd-purch-credit-reversal-task}
=======================================================================

This section describes how to request a merchant-initiated reversal for a PIN debit purchase or credit when you do not receive a response message for your original transaction request.  
Send the merchant-initiated reversal request to the voids endpoint.

Endpoint {#pd-purch-credit-reversal-task_d7e514}
------------------------------------------------

**Production:** `POST ``https://api.cybersource.com``/pts/v2/payments/`*{id}*`/voids`{#pd-purch-credit-reversal-task_d7e523}  
**Test:** `POST ``https://apitest.cybersource.com``/pts/v2/payments/`*{id}*`/voids`{#pd-purch-credit-reversal-task_d7e536}  
The *{id}* is the transaction ID returned in the purchase response.

Required Fields to Reverse a PIN Debit Purchase or Credit {#pd-purch-credit-reversal-req-fields}
================================================================================================

[clientReferenceInformation.code](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-code.md "")
:

[clientReferenceInformation.transactionId](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-transaction-id.md "")
:

[clientReferenceInformation.partner.thirdPartyCertificationNumber](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/client-ref-info-aa/client-ref-info-partner-third-party-certnum.md "")
:
`Cybersource` provides the value for this field.

[orderInformation.amountDetails.currency](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-currency.md "")
:

[orderInformation.amountDetails.totalAmount](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/order-info-aa/order-info-amount-details-total-amount.md "")
:

[paymentInformation.card.sourceAccountType](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-source-acct-type-a.md "")
:
Set the value to `UA`.

[paymentInformation.card.useAs](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-card-use-as.md "")
:
Leave this field blank.

[paymentInformation.paymentType.name](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-payment-type-name.md "")
:
Set the value to `CARD`.

[paymentInformation.paymentType.subTypeName](https://developer.cybersource.com/docs/cybs/en-us/api-fields/reference/all/rest/api-fields/payment-info-aa/payment-info-payment-type-sub-type-name.md "")
:
Set the value to `DEBIT`.

REST Example: Reverse a PIN Debit Purchase or Credit {#pd-purch-credit-reversal-ex-rest}
========================================================================================

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"
    }
}
```

