# BNC v1.0

## Process Flow

There is one method to integrate with BNC VA:

### VA From Acquirer

Merchant could hit create VA API (service code 27) to create their virtual account number by acquirer. The number created then will be inquired by acquirer, merchant can get the payment notification.&#x20;

Check this flow diagram to get know about this method

<figure><img src="https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FctXy3OIqF4KkJVNaJX4A%2FSNAP%20FLOW-DGPC.png?alt=media&#x26;token=4d0dfb3d-a19c-45d0-9ae3-53dc5fbe08d2" alt=""><figcaption><p>DOKU Generate Payment Code</p></figcaption></figure>

## Integration Steps&#x20;

Here is the overview of how to integrate with Virtual Account:

1. [How to generate Signature](https://developers.doku.com/get-started-with-doku-api/signature-component/snap)
2. [Create Virtual Account](#1.-create-virtual-account)
3. [Display Virtual Account](#2.-display-virtual-account)
4. [Acknowledge payment result](#3.-acknowledge-payment-result)
5. [Hit Check Status API](https://developers.doku.com/get-started-with-doku-api/check-status-api/snap)

***

### 1. Create Virtual Account&#x20;

To create Virtual Account, you will need to hit this API through your Backend:

#### API Endpoint

<table><thead><tr><th>Type</th><th>Value</th></tr></thead><tbody><tr><td>Service Code</td><td>27</td></tr><tr><td>HTTP Method</td><td>POST</td></tr><tr><td>API Endpoint Sandbox </td><td><p></p><pre class="language-json"><code class="lang-json">https://api-sandbox.doku.com/.../
</code></pre></td></tr><tr><td>API Endpoint Production</td><td><p></p><pre class="language-json"><code class="lang-json">https://api.doku.com/..../
</code></pre></td></tr><tr><td>Path</td><td><p></p><pre class="language-json"><code class="lang-json">/bi-snap-va/v1/transfer-va/create-va
</code></pre></td></tr></tbody></table>

Here is the sample request header, request body and response body for BNC VA&#x20;

1. #### DOKU Generate Payment Code

{% openapi src="<https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FeuF1Ch922M1iLe4cZ82L%2FBNC%20-%20DGPC5%20(1).json?alt=media&token=a705007a-9de8-4f46-9535-aeb1298eb561>" path="/bi-snap-va/bnc/v1/transfer-va/create-va" method="post" %}
[BNC - DGPC5 (1).json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FeuF1Ch922M1iLe4cZ82L%2FBNC%20-%20DGPC5%20\(1\).json?alt=media\&token=a705007a-9de8-4f46-9535-aeb1298eb561)
{% endopenapi %}

2. #### Merchant Generate Payment Code

{% openapi src="<https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FY9Mi2QkPo4fbQfOixfgv%2FBNC%20-%20MGPC5.json?alt=media&token=655f82bd-d103-4ccb-8aee-0f8aa1b53c9c>" path="/bi-snap-va/bnc/v1/transfer-va/create-va" method="post" %}
[BNC - MGPC5.json](https://3092822868-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FqCxtvLoJNNxvp4U7kLHd%2Fuploads%2FY9Mi2QkPo4fbQfOixfgv%2FBNC%20-%20MGPC5.json?alt=media\&token=655f82bd-d103-4ccb-8aee-0f8aa1b53c9c)
{% endopenapi %}

{% hint style="success" %}
**Pro Tips!**

1. You can also show payment instruction link to your customer by using `virtual_account_info.how_to_pay_page`&#x20;
2. If you wish to customize the UI for the payment instruction, you can use the `virtual_account_info.how_to_pay_api`
   {% endhint %}

### 2. Display Virtual Account

You can display the payment code to your customer by using `virtual_account_info.virtual_account_number` that you retrieved from the API response.<br>

### 3. Acknowledge payment result

After the payment is being made by your customer, DOKU will send **HTTP Notification** to your defined `Notification URL`.  Learn how to [handle the notification from DOKU](https://developers.doku.com/get-started-with-doku-api/notification/http-notification-sample-for-snap) .

### 4. Hit DOKU Check Status API

If you do not receive notifications from DOKU due to some issue, you can perform an API status check on the DOKU side to determine the updated transaction status. See the detailed request and response here [Check Status API](https://developers.doku.com/get-started-with-doku-api/check-status-api/snap).
