> For the complete documentation index, see [llms.txt](https://docs.payengine.co/payengine-api-v2.5/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.payengine.co/payengine-api-v2.5/transactions/void.md).

# Void Credit Authorization

<mark style="color:green;">`POST`</mark> `https://<Platform-host>/api/payment/void`

#### Request Body

<table><thead><tr><th width="189.583984375">Name</th><th width="155.1376953125">Type</th><th>Description</th></tr></thead><tbody><tr><td>id<mark style="color:red;">*</mark></td><td>string</td><td>Transaction ID (Authorization transaction)</td></tr></tbody></table>

<table><thead><tr><th width="228.1302490234375">Field Name</th><th width="97.5487060546875">Type</th><th width="224.03564453125">Description</th><th>Required?</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Platform payment ID for the void request</td><td>Required</td></tr><tr><td>transaction_id</td><td>string</td><td>Unique transaction ID</td><td>Required</td></tr><tr><td>gateway_id</td><td>string</td><td>ID of the gateway through which the transaction is processed</td><td>Optional</td></tr><tr><td>merchant_id</td><td>string</td><td>Merchant ID</td><td>Required</td></tr><tr><td>description</td><td>string</td><td>Transaction description sent in the original Auth or Sale transaction</td><td>Optional</td></tr><tr><td>token</td><td>string</td><td>Card token provided in the original sale or auth request</td><td>Required</td></tr><tr><td>internal_transaction_id</td><td>string</td><td>Internal Transaction ID provided in the original sale or auth request</td><td>Optional</td></tr><tr><td>void_response.status</td><td>string</td><td>Transaction execution status.<br>Allowed values PASS | FAIL</td><td>Required</td></tr><tr><td>void_response.response_code</td><td>string</td><td><a href="/pages/3svuRYXMTJ1St1Zhun0p">The code representing the status of the processed request</a></td><td>Required</td></tr><tr><td>void_response.response_message</td><td>string</td><td>The corresponding message for the response code</td><td>Required</td></tr><tr><td>void_response.auth_code</td><td>string</td><td>Authorization code received for the transaction</td><td>Optional</td></tr><tr><td>void_response.host_reference_number</td><td>string</td><td>A unique reference number by the acquiring processor for each transaction</td><td>Optional</td></tr><tr><td>void_response.host_response_code</td><td>string</td><td><a href="/pages/Jvv9mJQ96Xz9irQH3ll1">Response code indicating the status of the authorization request</a></td><td>Optional</td></tr><tr><td>void_response.task_id</td><td>string</td><td>Task identification number from acquiring processor</td><td>Required</td></tr><tr><td>void_response.transaction_id</td><td>string</td><td>Transaction Identifier</td><td>Optional</td></tr><tr><td>void_response.transaction_timestamp</td><td>string</td><td>Transaction timestamp in merchant's timezone</td><td>Required</td></tr><tr><td>void_response.voided_amount</td><td>string</td><td>Amount voided</td><td>Required</td></tr><tr><td>void_response.transaction_amount</td><td>string</td><td>Total amount requested in the original Auth or Sale transaction</td><td>Optional</td></tr><tr><td>void_response.card_holder_verification_code</td><td>string</td><td><a href="https://docs.payengine.co/payengine-api-reference/error-and-response-codes/cvv-verification-codes">CVV verification code</a></td><td>Optional</td></tr><tr><td>void_response.card_type</td><td>string</td><td><a href="/pages/G5qLQDvHFRdgZKjnObWJ">Card Type</a></td><td>Required</td></tr><tr><td>void_response.masked_card_number</td><td>string</td><td>The truncated card number displaying the last four digits</td><td>Required</td></tr><tr><td>void_response.masked_card_number</td><td>string</td><td>The truncated card number displaying the last four digits</td><td>Required</td></tr><tr><td>void_response.customer_receipt</td><td>string</td><td>Printable customer receipt</td><td>Required</td></tr><tr><td>void_response.merchant_receipt</td><td>string</td><td>Printable merchant receipt</td><td>Required</td></tr></tbody></table>

### Sample Request / Response

{% tabs %}
{% tab title="Request Body" %}
**Example Request**

```json
{
    "id": "a447b0b8-0dbb-4e07-bfc2-c35bba8d71e8"
}
```

{% endtab %}

{% tab title="Response Body" %}
**Example Response**

```json
{
    "data": {
        "id": "b755760f-7ac7-4b6c-ac10-8225b4a6f5c9",
        "merchant_id": "1e4e6029-2cc9-4b2c-87c1-7a4b2af6d6c6",
        "transaction_id": "165a95aa-06bd-4f3e-848e-5f0a5d86c78b",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "description": "Payment for the services",
        "internal_transaction_id": "987654321",
        "token": "card_sandbox_8Aq30HAc8TLFUFvTjqwo556i",
        "order_number": "Order124",
        "void_response": {
            "status": "PASS",
            "response_code": "A0000",
            "response_message": "Success",
            "auth_code": "705182",
            "host_response_code": "00",
            "host_reference_number": "846873152984",
            "task_id": "83398216",
            "transaction_id": "35117098",
            "transaction_timestamp": "2025-04-02T18:13:22",
            "voided_amount": "110.00",
            "transaction_amount": "110.00",
            "card_type": "visa",
            "masked_card_number": "1111",
            "customer_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:13 PM         \\n                VOID                \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 35117098      \\n       SUBTOTAL: USD $110.00        \\n         TOTAL: USD $110.00         \\n                 \\n                 \\n       NO SIGNATURE REQUIRED        \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Customer Copy            \\n",
            "merchant_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:13 PM         \\n                VOID                \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 35117098      \\n       SUBTOTAL: USD $110.00        \\n         TOTAL: USD $110.00         \\n                 \\n                 \\n      X_______________________      \\nI AGREE TO PAY ABOVE TOTAL AMOUNT IN\\n ACCORDANCE WITH CARD ISSUER's AGREE\\nMENT (MERCHANT AGREEMENT IF CREDIT V\\n              OUCHER)               \\n     KEEP COPY FOR YOUR RECORDS     \\n               \\n \\n                \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Merchant Copy            \\n"
        }
    }
}
```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
Webhook event: **PAYMENT\_VOIDED**
{% endhint %}

#### Webhook Payload Example

```json
{
    "event_uid": "95952444f9acee53ce26b6095b20059a",
    "event": "PAYMENT_VOIDED",
    "data": {
        "token": "card_sandbox_8Aq30HAc8TLFUFvTjqwo556i",
        "account_id": "fa3ac0a8-0cda-4e38-ba9d-357b0f0bd844",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "payment_id": "b755760f-7ac7-4b6c-ac10-8225b4a6f5c9",
        "description": "Payment for the services",
        "merchant_id": "1e4e6029-2cc9-4b2c-87c1-7a4b2af6d6c6",
        "order_number": "Order124",
        "void_response": {
            "status": "PASS",
            "task_id": "83398216",
            "auth_code": "705182",
            "card_type": "visa",
            "response_code": "A0000",
            "voided_amount": "110.00",
            "transaction_id": "35117098",
            "customer_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:13 PM         \\n                VOID                \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 35117098      \\n       SUBTOTAL: USD $110.00        \\n         TOTAL: USD $110.00         \\n                 \\n                 \\n       NO SIGNATURE REQUIRED        \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Customer Copy            \\n",
            "merchant_receipt": "        Sandbox US Merchant         \\n        200 Epcot Center Dr         \\n         Orlando, FL 32836          \\n            800-490-8514            \\n                 \\n                 \\n        2025-04-02 06:13 PM         \\n                VOID                \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 35117098      \\n       SUBTOTAL: USD $110.00        \\n         TOTAL: USD $110.00         \\n                 \\n                 \\n      X_______________________      \\nI AGREE TO PAY ABOVE TOTAL AMOUNT IN\\n ACCORDANCE WITH CARD ISSUER's AGREE\\nMENT (MERCHANT AGREEMENT IF CREDIT V\\n              OUCHER)               \\n     KEEP COPY FOR YOUR RECORDS     \\n               \\n \\n                \\n              APPROVED              \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n                 \\n           Merchant Copy            \\n",
            "response_message": "Success",
            "host_response_code": "00",
            "masked_card_number": "1111",
            "transaction_amount": "110.00",
            "host_reference_number": "846873152984",
            "transaction_timestamp": "2025-04-02T18:13:22"
        },
        "transaction_id": "165a95aa-06bd-4f3e-848e-5f0a5d86c78b",
        "internal_transaction_id": "987654321"
    }
}
```
