# Alfamart Cash Out

#### Transfer <a href="#transfer-cashout" id="transfer-cashout"></a>

This service serves to create transactions from partner to Faspay which are then used to process funds transfers from the account partner to the destination account that has been previously registered. Use this relative URL to generate the signature:

* Relative URL : ***/account/api/transfer***
* Method : **HTTP POST**

and is also used to create a **signature** and use the **requests header + request body.**

### **Request Transfer**

The parameters that must be provided by the partner system to be accessed with the Faspay system:

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

<table><thead><tr><th width="263">Parameter</th><th width="150">Type</th><th width="150">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>virtual_account</td><td>Numeric (20)</td><td>Mandatory</td><td>VA partner</td></tr><tr><td>beneficiary_bank_code</td><td>Alphanumeric (3)</td><td>Mandatory</td><td>Beneficiary bank code</td></tr><tr><td>beneficiary_region_code</td><td>Numeric (4)</td><td>Mandatory</td><td>Beneficiary Region Code</td></tr><tr><td>beneficiary_country_code</td><td>Alphanumeric (2)</td><td>Mandatory</td><td>Code Of Country</td></tr><tr><td>beneficiary_purpose_code</td><td>Numeric (1)</td><td>Mandatory</td><td>Code of purpose of using the system account</td></tr><tr><td>beneficiary_phone</td><td>Numeric (15)</td><td>Mandatory</td><td>Beneficiary Phone</td></tr><tr><td>beneficiary_email</td><td>Alphanumeric (128)</td><td>Mandatory</td><td>Beneficiary Email</td></tr><tr><td>trx_no</td><td>Numeric (12)</td><td>Mandatory</td><td>Transaction number (from partner)</td></tr><tr><td>trx_date</td><td>Datetime</td><td>Mandatory</td><td>datetime (YYYY-MM-DD H:i:s)</td></tr><tr><td>instruct_date</td><td>Datetime</td><td>Mandatory</td><td>Instruct date is date for transaction</td></tr><tr><td>trx_amount</td><td>Numeric</td><td>Mandatory</td><td>Total amount, ex : 50.000 -> 50000<strong>00.</strong> Amount must be multiple of IDR 50.000</td></tr><tr><td>trx_desc</td><td>Alphanumeric</td><td>Mandatory</td><td>Description, If the user input is more than 15 characters, it will be cut into 15 characters</td></tr><tr><td>callback_url</td><td>Alphanumeric (255)</td><td>Optional</td><td>URL for callback / notification, used if the partner wants the system to send notifications to the partner</td></tr><tr><td>trx_expired</td><td>Datetime</td><td>Optional</td><td>Transaction expired, <br>-null : expired date within 24 hours (depending on the partner)</td></tr><tr><td>beneficiary_account_name</td><td>Alphanumeric</td><td>Mandatory</td><td>beneficiary account name</td></tr></tbody></table>
{% endtab %}

{% tab title="Sample Request" %}

```json
{      
      "virtual_account":"9920015307",
      "beneficiary_bank_code":"alf",
      "beneficiary_region_code":"0391",
      "beneficiary_country_code":"ID",
      "beneficiary_purpose_code":"1",
      "beneficiary_phone":"0892132132123",
      "beneficiary_email":"agus@gmail.com",
      "trx_no":"431440034568",
      "trx_date":"2020-10-13 14:16:00",
      "instruct_date":"",
      "trx_amount":"5000000",
      "trx_desc":"Cash Out Alfamart",
      "callback_url":"https://sandbox-sendme.faspay.co.id/account/api/callback",
      "trx_expired":"",
      "address":"jln pintu air Raya",
      "beneficiary_account_name":"Agus Priyono"
}
```

{% endtab %}
{% endtabs %}

### **Response Transfer**

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

<table><thead><tr><th width="259">Parameter</th><th width="150">Type</th><th width="150">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>virtual_account</td><td>Numeric (20)</td><td>Mandatory</td><td>VA partner</td></tr><tr><td>beneficiary_bank_code</td><td>Alphanumeric (3)</td><td>Mandatory</td><td>Beneficiary Bank Code</td></tr><tr><td>beneficiary_region_code</td><td>Numeric (4)</td><td>Mandatory</td><td>Code of branch bank</td></tr><tr><td>beneficiary_country_code</td><td>Alphanumeric (2)</td><td>Mandatory</td><td>Country Code</td></tr><tr><td>beneficiary_purpose_code</td><td>Numeric (1)</td><td>Mandatory</td><td>Purpose Code</td></tr><tr><td>beneficiary_phone</td><td>Numeric (15)</td><td>Mandatory</td><td>Beneficiary Phone</td></tr><tr><td>beneficiary_email</td><td>Alphanumeric (128)</td><td>Mandatory</td><td>Beneficiary email</td></tr><tr><td>trx_no</td><td>Numeric (12)</td><td>Mandatory</td><td>Transaction number (from partner)</td></tr><tr><td>trx_date</td><td>Datetime</td><td>Mandatory</td><td>datetime (YYYY-MM-DD H:i:s)</td></tr><tr><td>instruct_date</td><td>Datetime</td><td>Mandatory</td><td>Response of instruct date has been sent</td></tr><tr><td>trx_amount</td><td>Numeric </td><td>Mandatory</td><td>Total amount, ex : 50.000 -> 50000<strong>00.</strong> Amount must be multiple of IDR 50.000</td></tr><tr><td>trx_desc</td><td>Alphanumeric</td><td>Mandatory</td><td>Description</td></tr><tr><td>callback_url</td><td>Alphanumeric (255)</td><td>Optional</td><td>URL for callback / notification, used if the partner wants the system to send notifications to the partner</td></tr><tr><td>ktp_id</td><td>Numeric (16)</td><td>Optional</td><td>ID KTP</td></tr><tr><td>place_of_birth</td><td>Alphanumeric (255)</td><td>Optional</td><td>Place of birth</td></tr><tr><td>date_of_birth</td><td>Datetime</td><td>Optional</td><td>Date of birth</td></tr><tr><td>gender</td><td>Alphanumeric (2)</td><td>Optional</td><td>Gender</td></tr><tr><td>citizenship</td><td>Alphanumeric (3)</td><td>Optional</td><td>Citizenship</td></tr><tr><td>occupation</td><td>Alphanumeric (255)</td><td>Optional</td><td>Occupation</td></tr><tr><td>trx_expired</td><td>Datetime</td><td>Optional</td><td>Transaction expired, <br>-null : expired date within 24 hours (depending on the partner)</td></tr><tr><td>address</td><td>Alphanumeric (255)</td><td>Mandatory</td><td>Address</td></tr><tr><td>beneficiary_account_name</td><td>Alphanumeric</td><td>Mandatory</td><td>Beneficiary Account Name</td></tr><tr><td>trx_id</td><td>Numeric</td><td>Mandatory</td><td>ID Transaction</td></tr><tr><td>trx_reff</td><td>Alphanumeric</td><td>Mandatory</td><td>Refference of transaction number on system disbursement</td></tr><tr><td>cashout_code</td><td>Numeric (16)</td><td>Mandatory</td><td>Cash Out Code</td></tr><tr><td>status</td><td>Numeric (1)</td><td>Mandatory</td><td>List Status Transaction: <br>1 = On Process, <br>2 = Success, <br>4 = Failed, <br>5 = Reverse</td></tr><tr><td>message</td><td>Alphanumeric </td><td>Mandatory</td><td>Message Description</td></tr><tr><td>response_code</td><td>Numeric (2)</td><td>Mandatory</td><td>Response code from bank (00 = success)</td></tr><tr><td>response_desc</td><td>Alphanumeric</td><td>Mandatory</td><td>Response description from bank</td></tr></tbody></table>
{% endtab %}

{% tab title=" Sample Response" %}

```json
{
    "virtual_account":"9920017573",
    "beneficiary_bank_code":"alf",
    "beneficiary_region_code":"0391",
    "beneficiary_country_code":"ID",
    "beneficiary_purpose_code":"1",
    "beneficiary_phone":"0892132132123",
    "beneficiary_email":"agus.priyono@faspay.co.id",
    "trx_no":"431440034568",
    "trx_date":"2020-10-13 14:16:00",
    "instruct_date":"",
    "trx_amount":"5000000",
    "trx_desc":"Cash Out Alfamart",
    "callback_ur":"https://sandbox-sendme.faspay.co.id/account/api/callback",
    "trx_expired":"",
    "address":"jln pintu air Raya",
    "beneficiary_account_name":"Agus Priyono",
    "trx_id":"1993275",
    "trx_reff":"aIvEmfwvo25RHfCXoNeU_9999982300002485",
    "cashout_code":"9999982300002485",
    "status":"1",
    "message":"On Process",
    "response_code":"00",
    "response_desc":"success"
}
```

{% endtab %}
{% endtabs %}
