# SNAP Create Virtual Account

This API is used to create virtual account in SNAP standard for route payment.

<table data-header-hidden><thead><tr><th width="165"></th><th></th></tr></thead><tbody><tr><td><strong>URL Path</strong></td><td><a href="https://debit-sandbox.faspay.co.id/v1.0/transfer-va/create-va">https://debit-sandbox.faspay.co.id/v1.0/transfer-va/create-va</a></td></tr><tr><td><strong>Method</strong></td><td>POST</td></tr></tbody></table>

## Request Parameter

The parameters that must be provided by the Merchant system to be accessed by the Faspay system are as follows:

<table><thead><tr><th width="271">SNAP Parameter</th><th width="149">Data Type</th><th width="85">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>virtualAccountName</td><td>String (128)</td><td>M</td><td>Customer name</td></tr><tr><td>virtualAccountEmail</td><td>String (128)</td><td>O</td><td>Customer email</td></tr><tr><td>virtualAccountPhone</td><td>String (30)</td><td>O</td><td>Customer's phone number. Format: 62xxxxxxxxxxxxx</td></tr><tr><td>trxId</td><td>String (32)</td><td>M</td><td>Transaction ID in Partner system</td></tr><tr><td>totalAmount</td><td>Object</td><td>O</td><td> </td></tr><tr><td>    value</td><td>String (16,2)</td><td>M</td><td>Transaction Amount. Total Amount with 2 decimals</td></tr><tr><td>    currency</td><td>String (3)</td><td>M</td><td>Currency = IDR</td></tr><tr><td>expiredDate</td><td>String (25)</td><td>O</td><td>Expiration date for Virtual Account. ISO-8601</td></tr><tr><td>additionalInfo</td><td>Object</td><td>O</td><td>Additional Information</td></tr><tr><td>    billDate</td><td>Datetime (25)</td><td>M</td><td>Transaction/ Order Date.<br>local time in yyyy-MM-ddTHH:mm:ssTZD format</td></tr><tr><td>    channelCode</td><td>Numeric (32)</td><td>M</td><td>Payment Channel Code VA ONLY refer to <a href="https://docs.faspay.co.id/merchant-integration/api-reference-1/debit-transaction/reference/payment-channel-code">here</a>.</td></tr><tr><td>    billDescription</td><td>String (18)</td><td>M</td><td>Bill description</td></tr><tr><td>    route</td><td>Object</td><td>O</td><td> </td></tr><tr><td>       owner</td><td>Alphanumeric (32) </td><td>O</td><td><p>Registered partner id that owns/generates the transaction. </p><p> </p><p><strong>Notes:</strong></p><ul><li>1 transaction only can contain 1 owner. </li><li> If null, then the remaining transaction amount will belong to the merchant’s Sendme balance. </li></ul></td></tr><tr><td>       partnerId</td><td>Alphanumeric (32) </td><td>O</td><td>Merchant partner id number.</td></tr><tr><td>      partnerAmount</td><td>Numeric (15) </td><td>C</td><td>Disbursement amount to partner.  </td></tr></tbody></table>

### Sample Request

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

```json
{
    "virtualAccountName": "Andi",
    "virtualAccountEmail": "andi@gmail.com",
    "virtualAccountPhone": "12345",
    "trxId": "7970999936312263",
    "totalAmount": {
        "value": "10000.00",
        "currency": "IDR"
    },
    "expiredDate": "2024-09-19T16:20:00+07:00",
    "additionalInfo": {
        "billDate": "2024-09-18T09:00:00+07:00",
        "channelCode": "708",
        "billDescription": "transaction",
        "route": [
            {
                "owner": "26100253"
            },
            {
                "partnerId": "29195827",
                "partnerAmount": "5000.00"
            },
            {
                "partnerId": "andre-121321346",
                "partnerAmount": "5000.00"
            }
        ]
    }
}
```

{% endtab %}
{% endtabs %}

## Response Parameter

Response parameters are parameters that will be delivered by Faspay system in response to the request that have been sent by the merchant system. If no parameters appropriate/value are incorrect, the transaction will be rejected in the system Faspay.

<table><thead><tr><th width="320">SNAP Parameter</th><th width="179">Data Type</th><th width="78">M/O/C</th><th>Description</th></tr></thead><tbody><tr><td>responseCode</td><td>String (7)</td><td>M</td><td>Response code. In details <a href="response-code">here</a>.</td></tr><tr><td>responseMessage</td><td>String (150)</td><td>M</td><td>Response description. In details <a href="response-code">here</a>.</td></tr><tr><td>virtualAccountData</td><td>Object</td><td>M</td><td> </td></tr><tr><td>    partnerServiceId</td><td>String (8)</td><td>M</td><td>Derivative of X-PARTNER-ID , similar to company code, 8 digit left padding space</td></tr><tr><td>    customerNo</td><td>String (20)</td><td>M</td><td>Unique number (up to 20 digits)</td></tr><tr><td>    virtualAccountNo</td><td>String (28)</td><td>M</td><td>partnerServiceId (8 digit left padding space) + customerNo (up to 20 digits)</td></tr><tr><td>    virtualAccountName</td><td>String (128)</td><td>M</td><td>Customer name</td></tr><tr><td>    virtualAccountEmail</td><td>String (128)</td><td>O</td><td>Customer email</td></tr><tr><td>    virtualAccountPhone</td><td>String (30)</td><td>O</td><td>Customer's phone number. Format: 62xxxxxxxxxxxxx</td></tr><tr><td>    trxId</td><td>String (32)</td><td>M</td><td>From create VA request</td></tr><tr><td>    totalAmount</td><td>Object</td><td>O</td><td> </td></tr><tr><td>        value</td><td>String (ISO4217) (16,2)</td><td>M</td><td>Transaction amount. The total amount with 2 decimals.</td></tr><tr><td>       currency</td><td>String (3)</td><td>M</td><td>Currency. Currency of amount based on ISO 4217.</td></tr><tr><td>    expiredDate</td><td>String (25)</td><td>M</td><td>Expiration date for Virtual Account. ISO-8601</td></tr><tr><td>    additionalInfo</td><td>Object</td><td>O</td><td>Additional Information for custom use</td></tr><tr><td>        billDate</td><td>Datetime (25)</td><td>M</td><td>Transaction/ order date</td></tr><tr><td>        channelCode</td><td>Numeric (32)</td><td>M</td><td>Payment channel code VA ONLY</td></tr><tr><td>         billDescription</td><td>String (18)</td><td>M</td><td>Bill description</td></tr><tr><td>         route</td><td>Object</td><td>O</td><td> </td></tr><tr><td>             owner</td><td>Alphanumeric (32) </td><td>O</td><td><p>Registered partner id that owns/generates the transaction. </p><p> </p><p><strong>Notes:</strong></p><ul><li>1 transaction only can contain 1 owner. </li><li>If null, then the remaining transaction amount will belong to the merchant’s Sendme balance. </li></ul></td></tr><tr><td>           partnerid</td><td>Alphanumeric (32) </td><td>O</td><td>Merchant partner id number.</td></tr><tr><td>          partneramount</td><td>Numeric (15) </td><td>C</td><td>Disbursement amount to partner.  </td></tr><tr><td>        redirectUrl</td><td>String</td><td>O</td><td>Merchant call back URL</td></tr></tbody></table>

### Sample Response

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

```json
{
    "responseCode": "2002700",
    "responseMessage": "Success",
    "virtualAccountData": {
        "partnerServiceId": "  338309",
        "customerNo": "25000598",
        "virtualAccountNo": "1726631925000598",
        "virtualAccountName": "Andi",
        "virtualAccountEmail": "andi@gmail.com",
        "virtualAccountPhone": "12345",
        "trxId": "7970999936312263",
        "totalAmount": {
            "value": "10000.00",
            "currency": "IDR"
        },
        "expiredDate": "2024-09-19T16:20:00+07:00",
        "additionalInfo": {
            "billDate": "2024-09-18T09:00:00+07:00",
            "channelCode": "708",
            "billDescription": "transaction",
            "route": [
                {
                    "owner": "26100253"
                },
                {
                    "partnerId": "29195827",
                    "partnerAmount": "5000.00"
                },
                {
                    "partnerId": "andre-121321346",
                    "partnerAmount": "5000.00"
                }
            ],
            "redirectUrl": "https://debit-sandbox.faspay.co.id/pws/100003/0830000010100000/d3cf14a84807d0d8240813243b26ee26de6e9739?trx_id=1726631925000598&merchant_id=99999&bill_no=7970999936312263"
        }
    }
}
```

{% endtab %}
{% endtabs %}
