---
title: E-Wallet - API Checkout
slug: en/nicepay-api-e-wallet-payment-api-checkout
description: Information about API Checkout - Payment for E-Wallet payment method provided by NICEPAY
image: https://archbee-image-uploads.s3.amazonaws.com/ZHvSjR5ZrsoxwKbJa3xmo/eNOUMSi2sohhvciBI4hjV_microsoftteams-image.png
icon: {"faIcon":"fa-solid fa-credit-card"}
docTags: 
createdAt: 2022-12-19T10:12:07.000Z
---

# About E-Wallet - API Checkout

***

This API uses by Merchants to request a payment to the NICEPAY for the E-Wallet payment method using Checkout API.



# Process Flow

***

## General

![General E-Wallet Flow](https://api.archbee.com/api/optimize/ueSgidS-H3kdWkcRhVS2v-_SWNxzPeNf9MV_i7u8D9z-20240821-034748.jpg "General E-Wallet Flow")

Flow description after checkout the order:

1. The Customer requests checkout to the Merchant.
2. The Merchant sends the checkout request using Registration API to NICEPAY.
3. NICEPAY sends the response of order regist to the Merchant.
4. The Merchant sends the Payment API to NICEPAY.
5. NICEPAY requests payment to the E-Wallet Partner.
6. The E-Wallet Partner generates the order.
7. NICEPAY stores the payment information.
8. During Payments:
   - If the Customer is using OVO E-Wallet, then the E-Wallet Partner will send notification to the related application to makes a payment.
   - If the Customer is using another E-Wallet (excluding OVO and AstraPay), then the E-Wallet Partner will redirects Customer to the Partner's payment page. After that, the Customer must login using their related E-Wallet account before proceeding the payment process.
9. The Customer sends the payment to the E-Wallet Partner.
10. The E-Wallet Partner receives the payment.
11. The E-Wallet Partner sends a notification to NICEPAY.
12. NICEPAY receives the notification.
13. NICEPAY sends the notification to the Merchant.
14. The Merchant receives the notification.
15. The Merchant requests a status check to NICEPAY.
16. NICEPAY sends the response of status checking to the Merchant.
17. The Merchant receives the final status.
18. The Merchant sends an order confirmation to the Customer.



## AstraPay

![AstraPay E-Wallet Flow](https://api.archbee.com/api/optimize/ueSgidS-H3kdWkcRhVS2v-T5by9bcJvmxK4Cc5TxDpL-20240821-034826.jpg "AstraPay E-Wallet Flow")

Flow description during payments:

1. If the Customer doesn't have AstraPay account yet.
   - The Customer requests checkout to the Merchant.
   - The Merchant sends the Registration API ([nicepay/api/linkEnable.do](#)) to NICEPAY.
   - NICEPAY sends the account link request to AstraPay.
   - AstraPay receives the request sent by NICEPAY.
   - AstraPay sends the response of redirect URL to the Partner's page to NICEPAY.
   - NICEPAY sends the response of the Partner's redirect URL to the Merchant.
   - The Merchant displays registration page to the Customer.
   - The Customer proceeds with the account registration.
   - The Customer sends the account registration to AstraPay.
   - AstraPay validates the account.
   - AstraPay sends a notification to NICEPAY.
   - NICEPAY sends a notification to the Merchant.
   - The Merchant sends a notification that the account already registered to the Customer.
2. The Customer requests checkout to the Merchant.
3. The Merchant requests ([nicepay/api/linkInitiate.do](#)) transaction to NICEPAY.
4. NICEPAY requests the transaction to AstraPay.
5. AstraPay generates the transaction.
6. AstraPay sends the response of redirect URL to NICEPAY.
7. NICEPAY sends the response of payment page redirect URL to Merchant.
8. The Merchant redirects the Customer to AstraPay's payment page.
9. The Customer verifies the payment.
10. The Customer makes payment to AstraPay.
11. AstraPay performs payment verification.
12. AstraPay sends a callback to NICEPAY.
    - NICEPAY sends the response to the Merchant.
    - Merchant displays the response of callback to the Customer.
13. AstraPay sends a notification to NICEPAY.
    - NICEPAY receives the notification.
    - NICEPAY sends notification to the Merchant.
    - The Merchant receives the notification.
14. The Merchant requests a payment status check to NICEPAY.
15. NICEPAY sends the response to the Merchant.
16. The Merchant receives the final status.
17. The Merchant updates transaction status to the Customer.



## Differences in Checkout Process Flow (Redirect)

The checkout process has two different flows, namely asynchronous and synchronous. In the asynchronous process flow, Customers need input credentials to enter the Partner's application before making payments. Meanwhile, for a synchronous process, Customers don't need to input the application's credentials first and can immediately make payments via payment notifications sent to the Customer's application.

The difference in these flows can be seen from the two E-Wallet process flows below.

### Asynchronous Process Flow

![Asynchronous on the E-Wallet Process Flow](https://app.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/Ro3IEekft89HgP9w5IyB-_nicepay-archbee-payment-e-wallet.png "Asynchronous on the E-Wallet Process Flow")

Flow description after checkout of the order:

1. The Customer requests checkout to the Merchant.
2. The Merchant sends a checkout request by using Registration API to NICEPAY.
3. NICEPAY sends the response of Registration API to the Merchant.
4. The Merchant requests Payment API to NICEPAY.
5. NICEPAY requests payment to the E-Wallet Partner.
6. The E-Wallet Partner generates the order.
7. NICEPAY stores the payment information.
8. If the Customer uses another E-Wallet (excluding OVO and AstraPay), then the E-Wallet Partner will redirect the Customer to the Partner's payment page.
9. The Customer login to the related E-Wallet account before making payment.
10. The Customer sends the payment to the E-Wallet Partner.
11. The E-Wallet Partner receives the payment.
12. The E-Wallet Partner sends a notification to NICEPAY.
13. NICEPAY receives the notification.
14. NICEPAY sends a notification to the Merchant.
15. The Merchant receives the notification.
16. The Merchant requests status checking to NICEPAY.
17. NICEPAY sends a response of status checking to the Merchant.
18. The Merchant receives the final status.
19. The Merchant sends an order confirmation to the Customer.



### Synchronous Process Flow

![Synchronous on the E-Wallet Process Flow](https://app.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/n7SzPqy6DiTnzKxGH89bM_nicepay-archbee-payment-ewallet-ovo.png "Synchronous on the E-Wallet Process Flow")

Flow description after checkout of the order:

1. The Customer requests checkout to the Merchant.
2. The Merchant sends a checkout using Registration API to NICEPAY.
3. NICEPAY sends a response of order regist to the Merchant.
4. The Merchant sends Payment API to NICEPAY.
5. NICEPAY requests payment to the E-Wallet Partner.
6. The E-Wallet Partner generates the order.
7. NICEPAY stores the payment information.
8. The E-Wallet Partner (OVO) will send a notification to the related application to make payments.
9. The Customer sends payment to the E-Wallet Partner.
10. The E-Wallet Partner receives payment.
11. The E-Wallet Partner sends a notification to NICEPAY.
12. NICEPAY receives the notification.
13. NICEPAY sends notifications to the Merchant.
14. The Merchant receives the notification.
15. The Merchant requests status checking to NICEPAY.
16. NICEPAY sends a response from status checking to the Merchant.
17. The Merchant receives the final status.
18. The Merchant sends an order confirmation to the Customer.



# NICEPAY Secure Payment Page E-Wallet

***

![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 Checkout payment sample with an E-Wallet method using NICEPAY Secure Payment Page.

![E-Wallet  - Secure Payment Page](https://api.archbee.com/api/optimize/ZHvSjR5ZrsoxwKbJa3xmo/TUJ4bDSQmBu0lpXLHPc5I_image-en-e-wallet-secure-payment-page.jpg "E-Wallet  - Secure Payment Page")

After the process of the payment registration request completes, you can continue the transaction process until settlement by following the guidelines in the [E-Wallet Payment Guide](docId\:gHV_PFy7cEv6HbCQRR_t-).

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

:::hint{type="warning"}
Note for ShopeePay and OVO E-Wallet, to provide a better user experience to the Customer, please give a warning message for the Customer to open via mobile devices.
:::



# API Checkout Transaction Payment

***

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



## Request Parameter for E-Wallet - 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 /> | TNICEEW05100202212201020014087                              |

:::hint{type="warning"}
Note for ShopeePay and OVO E-Wallet, to better user experience to the Customer, please request give a warning message for the Customer to open by mobile devices.
:::



## Response Parameter for E-Wallet - 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                                                                            |
| `tXid`                                                                      | AN       | 30       | Transaction ID	                                              | IONPAYTEST00202212201351474222<br /><br />When Success                             |
| `referenceNo`                                                               | ANS      | 40       | Order Number                                                 | ordNo20221220131215<br /><br />When Success                                        |
| `payMethod`<br /><font color="#2166ae">E-Wallet, Payloan</font>             | N        | 2        |  [Payment Method Code](docId\:NQ1y7vMa25ZtvQHN5He6W)         | 05<br /><br />When Success                                                         |
| `amt`                                                                       | N        | 12       | Transaction Amount                                           | 5000<br /><br />When Success                                                       |
| `transDt`<br /><font color="#2166ae">Only CC (Additional)</font>            | N        | 8        | Transaction Date (`YYYYMMDD`)                                | 20221220	<br /><br />When Success                                                  |
| `transTm`<br /><font color="#2166ae">CC</font>                              | N        | 6        | Transaction Time (`HH24MISS`)                                | 135201<br /><br />When Success                                                     |
| `mitraCd`<br /><font color="#2166ae">Direct Debit, E-Wallet, Payloan</font> | A        | 4        |  [Mitra Code](docId:0luP35KfOWksiSrzKx6yZ)                   | DANA<br /><br />When Success                                                       |
| `callBackUrl`                                                               | ANS      | 255      | Payment Result URL                                           | https\://webhook.site/7bef799f-ebe2-4328-a7b3-6d53deedca27<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 E-Wallet - API Checkout (CallbackUrl)
----------------------------------------------------------

***

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

### Request Parameter

:::CodeblockTabs
cURL

```curl
curl -X GET "https://www.merchant.com/callbackUrl?resultCd=0000&resultMsg=SUCCESS&tXid=IONPAYTEST00202212201351474222&referenceNo=ordNo20221220131215&payMethod=05&amt=5000&transDt=20221220&transTm=135201&mitraCd=DANA&callBackUrl=https%3A%2F%2Fwebhook.site%2F7bef799f-ebe2-4328-a7b3-6d53deedca27"
```
:::

### Callback Parameter

:::CodeblockTabs
Response Callback

```curl
resultCd=0000
resultMsg=SUCCESS
tXid=IONPAYTEST00202212201351474222
referenceNo=ordNo20221220131215
payMethod=05
amt=5000
transDt=20221220
transTm=135201
mitraCd=DANA
callBackUrl=https://webhook.site/7bef799f-ebe2-4328-a7b3-6d53deedca27
```
:::



## Callback Handling API Checkout Transaction Payment

***

:::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
https://www.merchant.com/callbackUrl?resultCd=0000&resultMsg=SUCCESS&tXid=IONPAYTEST00202212201351474222&referenceNo=ordNo20221220131215&payMethod=05&amt=5000&transDt=20221220&transTm=135201&mitraCd=DANA&callBackUrl=https%3A%2F%2Fwebhook.site%2F7bef799f-ebe2-4328-a7b3-6d53deedca27
```

Response Callback

```json
resultCd=0000
resultMsg=SUCCESS
tXid=IONPAYTEST00202212201351474222
referenceNo=ordNo20221220131215
payMethod=05
amt=5000
transDt=20221220
transTm=135201
mitraCd=DANA
callBackUrl=https://webhook.site/7bef799f-ebe2-4328-a7b3-6d53deedca27
```
:::

