---
title: Virtual Account - API Checkout
slug: en/nicepay-api-virtual-account-payment-api-checkout
description: Information about API Checkout - Payment for Virtual Account payment method provided by NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/w9BZM2O_z9CqKDV0sZVbA_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-credit-card"}
docTags: 
createdAt: 2022-12-19T10:12:12.000Z
---

# About Virtual Account - API Checkout&#x20;

***

This API uses by Merchants to request payment to NICEPAY with a Virtual Account payment method using Checkout API.&#x20;



# Flow Process

***

![VA Payment Flow with Checkout API](https://app.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/n88kWq7chrzSS1lWQ2LfE_nicepay-archbee-payment-va-new-va-redirect.png "VA Payment Flow with Checkout API")

Steps description:

1. The Customer performs checkout.
2. The Customer sends checkout data to the Merchant.
3. The Merchant requests checkout using Registration API to NICEPAY.
4. NICEPAY redirects the Merchant to payment page.
5. The Merchant sends NICEPAY's payment page to the Customer.
6. The Customer chooses the payment method.
7. The Customer makes the payment using VA to Bank.
8. Bank proceeds the payment.
9. Bank sends the payment result to the Customer.
10. Bank sends payment notification to NICEPAY.
11. NICEPAY updates the status of payment.
12. NICEPAY sends `dbProcessUrl` notification to the Merchant.
13. The Merchant receives the status.
14. The Merchant requests inquiry status to NICEPAY.
15. NICEPAY receives the request.
16. NICEPAY sends the response of inquiry status to the Merchant.
17. The Merchant receives the final status.
18. The Merchant sends the transaction result page to the Customer.



# NICEPAY Secure Payment Page

***

:::hint{type="info"}
Please visit the [VA Payment Guide](docId\:ie9RxFmM-gpySjakMrbvL) page to be able to provide your Customer with payment guide on the Virtual Account method.
:::

![Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/5EARwUJAR5medSH9j-vpw_image-en-nicepay-secure-payment-page-main-dashboard.jpg "Secure Payment Page")

The image above is a payment sample with Virtual Account method using NICEPAY Secure Payment Page.

Please directs your Customer to choose payment method options for ATM/Bank Transfer on NICEPAY's payment page to proceed Virtual Account transaction.

![Virtual Account - Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/qVCXV1TkktMvq9BzKj-dB_image-en-virtual-account-secure-payment-page.jpg "Virtual Account - Secure Payment Page")

After choosing the method with Bank Transfer, your Customer will provide with Bank lists that can choose to continue the payment process.

![Success - Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/X7yns0_Ku0yox1fj3qM7A_image-en-virtual-account-success-secure-payment-page.jpg "Success - Secure Payment Page")



# API Checkout Transaction Payment

***

Checkout Transaction Payment API for Virtual Account use to request registration and payment.

| **API URL**         | `/nicepay/redirect/v2/payment`&#xD;         |
| ------------------- | ------------------------------------------- |
| **Request Method**  | `Redirect-GET`                              |
| **Header**          | `Content-Type: application/Form-UrlEncoded` |



## Request Parameters for Virtual Account - API Checkout (CallbackUrl)

***

| **Parameter**                                             | **Type** | **Size** | **Description**       | **Remark**                                                  |
| --------------------------------------------------------- | -------- | -------- | --------------------- | ----------------------------------------------------------- |
| `paymentURL`  <br /><font color="#2166ae">Required</font> | ANS      | 14       | Payment URL<br />     | https\://dev.nicepay.co.id/nicepay/redirect/v2/payment&#xD; |
| `tXid` <br /><font color="#2166ae">Required</font>        | AN       | 30       | Transaction ID	<br /> | IONPAYTEST00202212231003086046                              |



## Response Parameters for Virtual Account - API Checkout (CallbackUrl)

***





| **Parameter** | **Type** | **Size** | **Description**                                             | **Remark**                                                  |
| ------------- | -------- | -------- | ----------------------------------------------------------- | ----------------------------------------------------------- |
| `resultCd`    | N        | 4        | [Result Code](docId:9eC3yH9CQqpb6cRWauWWO)                  | 0000                                                        |
| `resultMsg`   | AN       | 255      | Result Message: [Error Code](docId\:FsX1GESJKxOp0T9rvUHp_)  | SUCCESS                                                     |
| `bankVacctNo` | N        | 30       | Virtual Account Number                                      | 111111101003086046<br /><br />When Success                  |
| `tXid`        | AN       | 30       | Transaction ID	                                             | IONPAYTEST00202212231003086046<br /><br />When Success      |
| `referenceNo` | ANS      | 40       | Order Number                                                | ordNo20221223101289<br /><br />When Success                 |
| `amount`      | N        | 12       | Transaction Amount                                          | 10000<br /><br />When Success                               |
| `transDt`     | N        | 8        | Transaction Date (`YYYYMMDD`)	                              | 20221223<br /><br />When Success                            |
| `transTm`     | N        | 6        | Transaction Time (`HH24MISS`)	                              | 100308<br /><br />When Success                              |
| `bankCd`      | A        | 4        | [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                   | CENA<br /><br />When Success                                |
| `description` | AN       | 100      | Transaction Description                                     | Testing+Transaction+Virtual+Account<br /><br />When Success |

:::hint{type="info"}
Note: Response parameter will be sent through `callbackUrl` with Content-type: `application/json` and method: `POST Parameter`.
:::



## Sample Parameter for Virtual Account - API Checkout (CallbackUrl)

***

:::hint{type="success"}
On the payment when Checkout, the response from the request that got hit is a Callback URL.
:::

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl -X GET "https://www.merchant.com/callbackUrl?resultCd=0000&resultMsg=SUCCESS&bankVacctNo=111111101003086046&tXid=IONPAYTEST00202212231003086046&referenceNo=ordNo20221223101289&transDt=20221223&transTm=100308&amount=10000&bankCd=CENA&description=Testing+Transaction+Virtual+Account"
```
:::

### Callback Parameter

:::CodeblockTabs
Response Callback

```curl
resultCd=0000
resultMsg=SUCCESS
bankVacctNo=111111101003086046
tXid=IONPAYTEST00202212231003086046
referenceNo=ordNo20221223101289
transDt=20221223
transTm=100308
amount=10000
bankCd=CENA
description=Testing+Transaction+Virtual+Account
```
:::



## Callback Handling API Checkout Payment Virtual Account

***

:::hint{type="success"}
When Your callback already received `callbackUrl`, we recommended the Merchant to do the status verification using the [Status Inquiry - API Checkout](docId\:RhH7PmISd6IHN99yWVJHm).
:::

:::hint{type="warning"}
`Callback Handling` is very important to minimize the Fraud act, we highly recommend the Merchant to do the verification using `Callback parameter`.
:::

::Image[]{src="https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/hB3AyDaMVCRKhlIgcs-V4_nicepay-api-checkout-api-callback-handling-flow-1.png" size="60" isUploading="false" position="center" caption="Callback Handling Flow" width="370" height="361" darkWidth="370" darkHeight="361" showCaption="true" alt="Callback Handling Flow"}

:::CodeblockTabs
URL Callback

```json
"callbackUrl" : "https://www.merchant.com/callbackUrl/"
```

Response Callback

```json
resultCd:0000
resultMsg:SUCCESS
bankVacctNo:111111101452274313
tXid:IONPAYTEST00202212201452274313
referenceNo:ordNo20221220141258
transDt:20221220
transTm:144009
amount:10000
bankCd:CENA
description:Testing API
```
:::

