Skip to main content

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

  1. The customer selects DANA as the payment method.
  2. The customer is redirected to DANA's web page to log in.
  3. The customer enters their phone number and PIN to log in.
  4. The customer receives an SMS verification to verify their account.
  5. Post verification, the customer is presented with the billing details on screen.
  6. Once approved, the customer receives confirmation, and the merchant receives a success notification via webhook.

Mobile Browser Flow

  1. The customer selects DANA as the payment method.
  2. The customer is redirected to the DANA wallet app.
  3. The customer enters their mobile number and PIN for verification.
  4. The customer confirms the purchase after approving the verification.
  5. The merchant receives a success notification post confirmation via webhook.
First-time verification

The verification step is only required when the customer is transacting for the first time.

Technical flow

  • Request payment - Call the ws/direct endpoint 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.

  1. 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
  2. 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

    ParameterRequirementDescription
    operationRequiredSet to request
    integration_keyRequiredYour EBANX integration key
    payment_type_codeRequiredSet to dana
    countryRequiredSet to id for Indonesia

    Customer data

    ParameterRequirementDescription
    nameOptionalCustomer name
    emailRequiredCustomer email
    phone_numberOptionalCustomer phone

    Charge parameters

    ParameterRequirementDescription
    merchant_payment_codeRequiredUnique merchant payment code
    currency_codeRequiredSet to IDR
    amount_totalRequiredTotal 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
  3. 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"
    }
    }'
  4. 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 your
    Merchant Areachevron_right

    redirect_url behavior

    Note that the address returned from EBANX in redirect_url on the response (the address to which the customer must be redirected to continue with the transaction within the DANA environment) is different from the redirect_url specified by the merchant in the transaction request (the address to which the customer will be redirected at the end of the transaction).

  5. 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 Expiration

    The redirect link expires after 10 minutes. Ensure the customer completes the payment within this time frame.

    Sandbox Behavior

    When testing in sandbox, a simulator environment will be rendered to accept or decline the payment.

  6. Monitor payment for status changes

    Notifications

    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).

  7. Congratulations!

    You have successfully integrated DANA.

    For more information, refer to the
    Direct API reference guidechevron_right

Resources

Use the following resources when testing in your sandbox environment.

Still need help?

Help Image

We hope this article was helpful. If you still have questions, you can explore the following options: