DANA is one of Indonesia's leading digital wallet platforms, widely used for online and in-store payments through mobile apps. It enables consumers to pay instantly using their stored wallet balance, linked bank accounts, or cards by authorizing payments within the DANA app or scanning QR codes. DANA payments allow merchants to collect funds in real time through Indonesia's interoperable QRIS infrastructure and wallet network, making it a popular payment method for e-commerce, gaming, and everyday retail transactions across the country.
This guide will walk you through integrating DANA Wallet via API, covering essential steps like initiating payments, handling user redirection, checking payment statuses, and managing notifications.
Requirements
- API credentials - Ensure you have your EBANX integration key. If not, complete the Merchant Signup Form.
- Familiarity with EBANX Direct - This setup follows the same general structure as other payment methods, with a few unique parameters. See EBANX Direct for more info.
How it works
Web Flow
- The customer selects DANA as the payment method.
- The customer is redirected to DANA's web page to log in.
- The customer enters their phone number and PIN to log in.
- The customer receives an SMS verification to verify their account.
- Post verification, the customer is presented with the billing details on screen.
- Once approved, the customer receives confirmation, and the merchant receives a success notification via webhook.
Mobile Browser Flow
- The customer selects DANA as the payment method.
- The customer is redirected to the DANA wallet app.
- The customer enters their mobile number and PIN for verification.
- The customer confirms the purchase after approving the verification.
- The merchant receives a success notification post confirmation via webhook.
The verification step is only required when the customer is transacting for the first time.
Technical flow
-
Request payment - Call the
ws/directendpoint with the parameters defined below. -
Payment instructions - In response to this request, EBANX will return a redirect link to the DANA platform, to which the merchant must redirect the customer to complete the transaction.
-
Customer completes the payment - Once this link is accessed, the customer will have 10 minutes to complete the transaction. During this time, the transaction will be set on our platform with the status pending (
PE). -
Payment Confirmation - Once the transaction is successful, the customer receives a confirmation on their e-wallet app, and the merchant is updated with the transaction status.
-
EBANX notification - EBANX sends you a webhook notification confirming the successful transaction, allowing you to fulfill your customer's order.
Instructions
Follow the steps below.
- Select your environment
Select the appropriate environment for your integration. Use the sandbox environment for testing or the production environment for live transactions.
Select the appropriate environment for your integration. Use the sandbox environment for testing, or the production environment for live transactions. Use the URL for your HTTP requests based on your selection.
https://sandbox.ebanx.com/ws/direct - Define your parameters
To create a DANA payment, you need to define the parameters in your request. The following tables outline the required parameters for the payment process.
Basic parameters
Parameter Requirement Description operationRequired Set to requestintegration_keyRequired Your EBANX integration key payment_type_codeRequired Set to danacountryRequired Set to idfor IndonesiaCustomer data
Parameter Requirement Description nameOptional Customer name emailRequired Customer email phone_numberOptional Customer phone Charge parameters
Parameter Requirement Description merchant_payment_codeRequired Unique merchant payment code currency_codeRequired Set to IDRamount_totalRequired Total amount to be charged Minimum and Maximum Amounts- Minimum Amount: IDR 1
- Maximum Amount (E-wallet Regular / Non-KYC User): IDR 2,000,000
- Maximum Amount (E-wallet Premium / KYC User): IDR 20,000,000
- Payment request
Once your customer submits a DANA payment, create a payment request using the ws/direct endpoint.
Sample request
curl -X POST \
--location 'https://sandbox.ebanx.com/ws/direct' \
--header 'Content-Type: application/json' \
--data '{
"integration_key": "{{integration_key}}",
"operation": "request",
"payment": {
"name": "John Doe",
"email": "john.doe@example.com",
"country": "id",
"phone_number": "628100000000",
"payment_type_code": "dana",
"merchant_payment_code": "{{merchant_payment_code}}",
"currency_code": "IDR",
"amount_total": 444,
"redirect_url": "https://acquirer.redirect.example.com"
}
}' - Payment successful response
Each request returns a response similar to the example below.
{
"payment": {
"hash": "<{hash_here}>",
"country": "id",
"merchant_payment_code": "{{merchant_payment_code}}",
"order_number": null,
"status": "PE",
"status_date": null,
"open_date": "{{YYYY-MM-DD HH:mm:ss}}",
"confirm_date": null,
"transfer_date": null,
"amount_br": "444.00",
"amount_ext": "444.00",
"amount_iof": "0.00",
"currency_rate": "1.0000",
"currency_ext": "IDR",
"due_date": "{{YYYY-MM-DD}}",
"instalments": "1",
"payment_type_code": "dana",
"pre_approved": false,
"capture_available": null,
"customer": {
"document": "00000000000000",
"email": "john.doe@example.com",
"name": "John Doe"
},
"currency_ext_base": "IDR",
"redirect_url": "https://sandbox.ebanx.com/ws/redirect/execute?hash=<{hash_here}>"
},
"status": "SUCCESS",
"redirect_url": "https://sandbox.ebanx.com/ws/redirect/execute?hash=<{hash_here}>"
}At this stage, the payment will appear as pending (PE) in yourMerchant Areachevron_rightredirect_url behaviorNote that the address returned from EBANX in
redirect_urlon the response (the address to which the customer must be redirected to continue with the transaction within the DANA environment) is different from theredirect_urlspecified by the merchant in the transaction request (the address to which the customer will be redirected at the end of the transaction). - Redirect customer to DANA
The merchant must use the redirect URL to direct the customer to the DANA e-wallet app (in case of mobile) or web login (in case of web flow).
"redirect_url": "https://sandbox.ebanx.com/ws/redirect/execute?hash=<{hash_here}>",Link ExpirationThe redirect link expires after 10 minutes. Ensure the customer completes the payment within this time frame.
Sandbox BehaviorWhen testing in sandbox, a simulator environment will be rendered to accept or decline the payment.
- Monitor payment for status changes
Notifications
-
EBANX will send a notification whenever a payment status changes.
-
Make sure your system is set up to receive notifications from EBANX for any changes in payment status.
Status
-
After receiving a notification that the status has changed, retrieve the payment status.
-
When a payment is confirmed, the status will change from pending (PE) to confirmed (CO). If the customer does not complete the payment, the status will eventually change to cancelled (CA).
-
- Congratulations!
You have successfully integrated DANA.
For more information, refer to theDirect API reference guidechevron_right
Resources
Use the following resources when testing in your sandbox environment.
API Reference
Click here to access detailed API documentation to integrate efficiently.
Mock Customer Data
Click here to view mock customer data for testing and validating user flows.
Error Codes
Click here to review common error codes to troubleshoot and resolve issues quickly.
Still need help?
We hope this article was helpful. If you still have questions, you can explore the following options:
- Merchant support: Contact our support team at sales.engineering@ebanx.com for assistance.
- Not a partner yet? Please complete the Merchant Signup Form, and our commercial team will reach out to you.