# Transaction Void

Transaction void means that the user refuse / reject the transaction or commonly known as a reversal, the void can be done online or offline depending on each bank's services. Reversal is done on the same day before the cut off set by the bank, for example, if the cut-off transaction at 20:00 the night then the process void conducted under these hours will be accepted but if the void is done after the cut off bank then faspay will provide information notification to the merchant that the void fails with code **5621 (Void rejected by bank)**.

{% hint style="danger" %}
Not all banks support these Feature, please ensure that use merchant acquiring banks already exist those features and has been working with Faspay. Merchant can mark the transaction void or canceled through the features provided FPG. FPG is a payment gateway system that serves to communicate directly with the bank system, which can void the transaction is a transaction with status

N = Pending / Waiting

A = Authorize (authorize transactions in the bank

RC = Status of the bank is not known, the user must confirm return for the transaction
{% endhint %}

**Request Parameter Transaction Void**

Request parameter is a void transaction parameters that must be provided by the merchant's system can conduct transactions through the system Faspay void.

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

<table><thead><tr><th width="179">Parameter</th><th width="133">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 use value ‘10’.</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" : 10,
 "merchant_id": "auto_store",
 "merchant_tranid": "AGS028",
 "transaction_id": "477DC7E5-D26B-46C5-AF39-61D8B47310AB",
 "amount": "20000.00",
 "signature" : "56c4c92226047a620374f4829d8058a5f955d684"
}
```

{% endtab %}
{% endtabs %}

**Response Parameter Transaction Void**

Response Parameter Transaction Void are parameters that will be delivered by the system Faspay in response to a request parameter void 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="179">Parameter</th><th width="133">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">M</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><tr><td>response_message</td><td>String(150)</td><td align="center">M</td><td>Response description.</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Response" %}

```php
{
 "merchant_id": "auto_store",
 "merchant_tranid": "AGS005",
 "txn_status": "V",
 "amount": "10000.00",
 "transaction_id": "A8748400-4AA3-4398-93DC-8F8AB700067D",
 "signature": "2135733F271496053D269E27C5B89D10692BA0D9",
 "tran_date": "2024-09-04 15:06:05",
 "response_code": "00",
 "response_message": "Success"
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.faspay.co.id/merchant-integration/api-reference-1/credit-card-transaction/additional-api-integration/transaction-void-1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
