> For the complete documentation index, see [llms.txt](https://docs.faspay.co.id/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.faspay.co.id/merchant-integration/api-reference-1/credit-card-transaction/additional-api-integration/capture-transaction-1.md).

# Capture Transaction

Capture transaction means that the user approve / approve credit card transactions that have been verified bank (authorize transactions), the merchant then sends a request to capture the transaction to receive and collect the payments to customers who registered on the credit card used. Requests capture can only be made for transactions already in the authorize by the bank (field TXN\_STATUS = A). In some banks already provide services for the automation of the capture process that can be set in accordance with merchant demand.

**Request Parameter Capture Transaction**

Request parameter capture the transaction is a parameter that must be provided by the merchant system to be able to capture transactions through the system Faspay.

{% tabs %}
{% tab title="Request" %}

<table><thead><tr><th width="188">Parameter</th><th width="134">Data Type</th><th width="93" align="center">M/O/C</th><th width="300">Description</th></tr></thead><tbody><tr><td>transaction_type</td><td>Integer(2)</td><td align="center">M</td><td>For capture transaction API, always used value ‘2’</td></tr><tr><td>merchant_id</td><td>Varchar(30)</td><td align="center">M</td><td>Your Faspay Merchant ID.</td></tr><tr><td>merchant_tranid</td><td>Varchar(100)</td><td align="center">M</td><td>Merchant’s unique transaction id as passed in from the payment request.</td></tr><tr><td>transaction_id</td><td>Varchar</td><td align="center">O</td><td>Transaction ID generated by Faspay. Fill this parameter with transaction_id provided in return_url or callback_url when payment occur.</td></tr><tr><td>amount</td><td>Varchar(10)</td><td align="center">M</td><td>Transaction amount as passed in from the payment request.</td></tr><tr><td>signature</td><td>Varchar(40)</td><td align="center">M</td><td>Transaction signature of request for data integrity check.</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Request" %}

```php
{
 "transaction_type" : 2,
 "merchant_id": "auto_store",
 "merchant_tranid": "AGS028",
 "transaction_id": "477DC7E5-D26B-46C5-AF39-61D8B47310AB",
 "amount": "20000.00",
 "signature" : "56c4c92226047a620374f4829d8058a5f955d684"
}
```

{% endtab %}
{% endtabs %}

**Response Parameter Capture Transaction**

Response transaction capture parameters are parameters that will be delivered by the system in response to a request Faspay capture parameter transaction that has been submitted by the merchant system. If no parameters are not appropriate / value is incorrect, the transaction will be rejected in the system Faspay.

{% tabs %}
{% tab title="Response" %}

<table><thead><tr><th width="188">Parameter</th><th width="134">Data Type</th><th width="93" align="center">M/O/C</th><th width="300">Description</th></tr></thead><tbody><tr><td>merchant_id</td><td>Varchar(30)</td><td align="center">M</td><td>Your Faspay Merchant ID.</td></tr><tr><td>merchant_tranid</td><td>Varchar(100)</td><td align="center">M</td><td>Merchant’s own assigned transaction id as passed in from the request.</td></tr><tr><td>tnx_status</td><td>Varchar(3)</td><td align="center"></td><td>Transaction status from Faspay.<br>A – Authorized<br>S – Sales<br>C – Captured<br>CF – Capture Failed<br>F – Failed<br>E – Error<br>B – Blocked<br>N – Pending<br>V – Void</td></tr><tr><td>amount</td><td>Varchar(10)</td><td align="center">M</td><td>Transaction amount as passed in from the request.</td></tr><tr><td>transaction_id</td><td>Varchar</td><td align="center">M</td><td>Transaction ID generated by Faspay when payment occur-Occur.</td></tr><tr><td>signature</td><td>Varchar(40)</td><td align="center">M</td><td>Transaction signature of request for data integrity check.</td></tr><tr><td>tran_date</td><td>Varchar(19)</td><td align="center">C</td><td>Transaction date of when transaction is submitted to Faspay e-Payment. Date format in ‘DD-MM-YYYY hh:mm:ss’ e.g. 24-05-2024 08:24:23 In the event of error, this field may be empty.</td></tr><tr><td>response_code</td><td>String(7)</td><td align="center">M</td><td>Response code.</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Response" %}

```php
{
 "merchant_id": "auto_store",
 "merchant_tranid": "AGS008",
 "txn_status": "C",
 "amount": "10000.00",
 "transaction_id": "0AFEAC6A-7FA7-4F4C-B6EA-B1FD5D2D9161",
 "signature": "09FB66982A1ED05122581951F9BDBAF7AC3B6CF9",
 "tran_date": "2024-09-04 14:39:29",
 "response_code": "00",
 "response_message": "Success"
}
```

{% endtab %}
{% endtabs %}
