> 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/capture.md).

# Credit Card Capture

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

#### Request Body

<table><thead><tr><th>Name</th><th width="143">Type</th><th>Description</th></tr></thead><tbody><tr><td>id<mark style="color:red;">*</mark></td><td>string</td><td>transactionID returned from original <a href="/pages/065QcpZn3oMf8eImBfcX">Auth</a> request</td></tr><tr><td>data.transaction_amount</td><td>string</td><td><p>Max Length=12<br>Allowed characters: 0-9 and .(dot)<br><br>Note: this value always reflects the total dollar amount for example 1.00 and 1 both will be considered $1.00 and 0.10 will be 10 cents.</p><p>Transaction amount must be less or equal to the authorized amount. If not provided, the entire authorized amount is converted into sale and flag for settlement.</p></td></tr><tr><td>data.pre_settlement_fee_charge</td><td>string</td><td>PreSettlement Fee charge must be less or equal to the amount specified in the Auth call. If not provided, the preSettlementFeeCharge provided in the auth call will be considered</td></tr><tr><td>data.post_settlement_fee_charge</td><td>string</td><td>PostSettlement Fee charge must be less or equal to the amount specified in the Auth call. If not provided, the postSettlementFeeCharge provided in the auth call will be considered</td></tr><tr><td>data.metadata</td><td>object</td><td>Add any additional metadata by passing a json object</td></tr></tbody></table>

{% tabs %}
{% tab title="200 " %}
{% tabs %}
{% tab title="Field Definitions" %}

<table><thead><tr><th width="305.939453125">Field Name</th><th width="85.548828125">Type</th><th width="262.404296875">Description</th><th>Required?</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Platform payment ID for the sale 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>merchant_id</td><td>string</td><td>Merchant 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>description</td><td>string</td><td>Transaction Description from the original auth request</td><td>Optional</td></tr><tr><td>internal_transaction_id</td><td>string</td><td>Internal Transaction ID provided in the original auth request</td><td>Optional</td></tr><tr><td>capture_response.status</td><td>string</td><td>Transaction execution status.<br>Allowed values PASS | FAIL | PENDING_3DSAUTH</td><td>Required</td></tr><tr><td>capture_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>capture_response.response_message</td><td>string</td><td>The corresponding message for the response code</td><td>Required</td></tr><tr><td>capture_response.auth_code</td><td>string</td><td>Authorization code received for the transaction</td><td>Optional</td></tr><tr><td>capture_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>capture_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>capture_response.task_id</td><td>string</td><td>Task identification number from acquiring processor</td><td>Required</td></tr><tr><td>capture_response.transaction_id</td><td>string</td><td>Transaction Identifier</td><td>Optional</td></tr><tr><td>capture_response.transaction_timestamp</td><td>string</td><td>Transaction timestamp in merchant's timezone</td><td>Required</td></tr><tr><td>capture_response.transaction_amount</td><td>string</td><td>Total amount requested in this transaction</td><td>Optional</td></tr><tr><td>capture_response.processed_amount</td><td>string</td><td>The actual amount processed by the processor. In standard processing, <code>processedAmount</code> is same as <code>transactionAmount</code> . The differences become relevant when features like partial authorization or multi-currency are enabled.</td><td>Required</td></tr><tr><td>capture_response.total_amount</td><td>string</td><td>Total amount of this transaction</td><td>Optional</td></tr><tr><td>capture_response.card_type</td><td>string</td><td><a href="/pages/G5qLQDvHFRdgZKjnObWJ">Card Type</a></td><td>Required</td></tr><tr><td>capture_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>capture_response.fraud_score</td><td>int</td><td>Return the fraud score between 0 - 100. 100 means less confidence i.e. more fraudulent i and 0 means lower chance of fraudulent.<br>Note: The fraud monitoring has to be enabled. Please contact support to enable it</td><td>Optional</td></tr><tr><td>capture_response.kount_score</td><td>int</td><td>Return the Kount Omniscore if Kount is enabled for the account</td><td>Optional</td></tr><tr><td>capture_response.customer_receipt</td><td>string</td><td>Printable customer receipt</td><td>Required</td></tr><tr><td>capture_response.merchant_receipt</td><td>string</td><td>Printable merchant receipt</td><td>Required</td></tr><tr><td>metadata</td><td>string</td><td>Return all the metadata sent in the request</td><td>Optional</td></tr></tbody></table>
{% endtab %}
{% endtabs %}
{% endtab %}
{% endtabs %}

### Sample Request / Response

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

```json
{
    "id": "4126266e-7895-46ad-ae58-92620aa2befe",
    "data": {
        "transaction_amount": "150.00",
        "metadata": {
            "customer_id": "123",
            "email" : "test@test.com"
        }
    }
}
```

{% endtab %}

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

```json
{
    "data": {
        "id": "2a0e8a3b-7703-4d31-a8cd-c714fed4dedf",
        "merchant_id": "1e4e6029-2cc9-4b2c-87c1-7a4b2af6d6c6",
        "transaction_id": "ca8c6e03-1699-4528-bb0c-5894e87ecf47",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "description": "Description of transaction",
        "internal_transaction_id": "987654321",
        "capture_response": {
            "status": "PASS",
            "response_code": "A0000",
            "response_message": "Success",
            "auth_code": "323072",
            "host_response_code": "00",
            "host_reference_number": "325806055923",
            "task_id": "95103204",
            "transaction_id": "67868150",
            "transaction_timestamp": "2025-04-02T18:26:38",
            "card_type": "visa",
            "transaction_amount": "1.00",
            "processed_amount": "1.00",
            "total_amount": "1.00",
            "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:26 PM         \\n           CREDIT - SALE            \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 67868150      \\n     Description: Test Capture      \\n        SUBTOTAL: USD $1.00         \\n          TOTAL: USD $1.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:26 PM         \\n           CREDIT - SALE            \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 67868150      \\n     Description: Test Capture      \\n        SUBTOTAL: USD $1.00         \\n          TOTAL: USD $1.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",
            "masked_card_number": "1111"
        },
        "metadata": {
            "customer_id": "123",
            "email": "test@test.com"
        }
    }
}
```

{% endtab %}
{% endtabs %}

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

#### Webhook Payload Example

```json
{
    "event_uid": "df146813e8523c1cd5afbda038486120",
    "event": "PAYMENT_CAPTURED",
    "data": {
        "metadata": {
            "email": "test@test.com",
            "customer_id": "123"
        },
        "account_id": "fa3ac0a8-0cda-4e38-ba9d-357b0f0bd844",
        "gateway_id": "1f3e0f67-d560-494c-bb1a-97558a462cc5",
        "payment_id": "2a0e8a3b-7703-4d31-a8cd-c714fed4dedf",
        "description": "Description of transaction",
        "merchant_id": "1e4e6029-2cc9-4b2c-87c1-7a4b2af6d6c6",
        "transaction_id": "ca8c6e03-1699-4528-bb0c-5894e87ecf47",
        "capture_response": {
            "status": "PASS",
            "task_id": "95103204",
            "auth_code": "323072",
            "card_type": "visa",
            "total_amount": "1.00",
            "response_code": "A0000",
            "transaction_id": "67868150",
            "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:26 PM         \\n           CREDIT - SALE            \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 67868150      \\n     Description: Test Capture      \\n        SUBTOTAL: USD $1.00         \\n          TOTAL: USD $1.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:26 PM         \\n           CREDIT - SALE            \\n            Card # 1111             \\n          Card Type: VISA           \\n         Entry Mode : KEYED         \\n      Transaction ID: 67868150      \\n     Description: Test Capture      \\n        SUBTOTAL: USD $1.00         \\n          TOTAL: USD $1.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",
            "processed_amount": "1.00",
            "response_message": "Success",
            "host_response_code": "00",
            "masked_card_number": "1111",
            "transaction_amount": "1.00",
            "host_reference_number": "325806055923",
            "transaction_timestamp": "2025-04-02T18:26:38"
        },
        "internal_transaction_id": "987654321"
    }
}
```
