DANA
Basic information
Customers verify and confirm payment through the hosted wallet flow.
- Integration paths: Direct API, Checkout, Web SDK
- Transaction types: One-time payment, self-managed subscription (Direct API)
lpmsInfo.lpmsType:DANA- Web SDK
config.paymentMethod:['DANA']
| Customer country/region | Order currency |
|---|---|
| 🇮🇩 ID | IDR |
The customer country/region is the billingInformation.country value in the payment request.
This guide covers enabled DANA configurations. It applies when you have collected the customer’s billing name, email, country, and any identity details required for your enabled configuration, as described in Before you begin. Before using another market or order currency, confirm the enabled scope for your merchant account and application with Onerway, then check the current order with List available payment methods.
Before you begin
Complete Setup and confirm that DANA is enabled. Also confirm transaction limits, the applicable payment validity period, settlement arrangements, and the test procedure. For amount formatting, see Currency and amount validation.
Confirm the customer identity details required for your enabled configuration with Onerway. Collect the billing name, email, actual country, and any required identity details before creating the payment. Follow the API conditions for shipping information. Configure your notification and return URLs, and store the mapping between your order and the Onerway identifiers.
Start the payment
Direct API
- Check List available payment methods for the current order. After the customer selects this method, call Create direct transaction from your server with
productType=LPMS,subProductType=DIRECT,txnType=SALE, andpaymentMode=WEB. SetlpmsType=DANAinlpmsInfo, encoded as a JSON string. - Supply the collected
firstName,lastName,email, and actualcountryinbillingInformation. AddidentityNumberas a string only when required by your enabled configuration, using the agreed document type and format. Both billing and shipping objects must include their required email and country and meet the other API field conditions. Encode both objects as JSON strings. Include products, notification and return URLs, and merchant-collected end-user IP, browser, and device information intxnOrderMsg. Keep product and order currencies consistent, with product amounts, discounts, and shipping fees adding up toorderAmount.
Select the request example “Redirect local payment request (illustrative)”. It uses Bancontact / BE / EUR to show the shared structure. Replace the method withDANA, use IDR for this flow, and supply the actual order and customer details. The example amount does not establish a transaction limit. - Store the returned
paymentIdandtransactionId. Whenstatus=RandactionType=RedirectURL, direct the customer toredirectUrl. The response example “Redirect local payment response (illustrative)” shows this shape. For other actions or states, follow Local payment integration. Do not repeatedly create the same order while waiting. - The returned
redirectUrlmay open a provider payment page or the wallet. The customer follows the instructions for that attempt. When the customer returns to your site, display the result retrieved from your server. See Request authentication for authentication.
Checkout
When locking Checkout to this method, first call List available payment methods for the current order and confirm that the method is returned. When Checkout displays all available methods, Onerway performs this filtering.
Supply the collected firstName, lastName, email, and country in billingInformation. If your configuration requires an identity number, submit it as a string in identityNumber; use the agreed document type and format. Both billing and shipping objects must meet the API field conditions. This flow does not rely on the payment page collecting missing identity details.
- On your server, call Create checkout payment with
productType=ALL,subProductType=DIRECT, andtxnType=SALE. To show only DANA, setlpmsInfo.lpmsTypetoDANA, sendinglpmsInfoas a JSON string. If you omitlpmsInfo, the customer chooses from the methods available for the order. - Supply the required billing, shipping, product, return URL, and notification URL fields. Encode
billingInformationandshippingInformationas JSON strings. Keep product and order currencies consistent, and ensure that product amounts, discount entries, and shipping fees add up toorderAmount.
Select the request example “Unified Checkout with all available payment methods”. Replace the order and customer details, use IDR for this flow, and add this method’slpmsInfoif you want to select only DANA. Remove the example’scardInfoobject for this flow. The example shows the shared Checkout request structure. - Select the response example “Unified Checkout session created”. Store the returned
paymentIdandtransactionIdagainst your order, then redirect the customer’s browser toredirectUrl. The initialstatus=Umeans that payment has not been completed. - Checkout handles the payment page and subsequent customer interaction. When the customer reaches
returnUrl, display the result retrieved from your server. For request authentication, redirects, and return handling, see Checkout integration.
Web SDK
Keep the SDK payment-method interface and provide the customer details for this flow when creating the transaction. Submit the collected firstName, lastName, email, and country in billingInformation, encoded as a JSON string. Follow the API conditions for other fields and add identityNumber when required by your enabled configuration. The linked “One-time SDK payment” example omits these billing details; add them when implementing this flow.
- On your server, call Create SDK transaction with
productType=ALL,subProductType=DIRECT, andtxnType=SALE. Select the request example “One-time SDK payment” and the response example “One-time SDK transaction created”. These examples show the shared creation flow before a payment method is selected. Use IDR for this flow and replace the amount and product details with the actual order, keeping the product and order currencies consistent. - Use the returned
paymentIdto create the SDK’s Checkout instance, following Web SDK integration. To display only this method, setconfig.paymentMethodto['DANA']in the initialization options. Subscribe to events and mount the default Payment Element. This configuration only filters methods returned by the server; it does not enable DANA. - In the
readyevent, check thatavailablePaymentMethodscontainsDANA. - After the customer selects DANA and completes any fields shown, call
confirmPayment()from your payment button. Handle the actualpaymentStatusandnextActionreturned. For the complete event and error handling flow, see Web SDK integration.
With the Web SDK, paymentStatus=R means that customer interaction must continue. Handle the actual nextAction.type returned:
PresentToShopper: keep the current SDK Checkout instance and leave its Payment Element mounted while the SDK presents the payment interface, wait forpayment_result, and do not callconfirmPayment()again.RedirectShopper: wait for the customer to reach thereturnUrlsupplied when creating the order, then query the order on your server. Initially show that the result is being confirmed.
Customer actions and final result
Customers follow the instructions on the current payment page or in the DANA wallet to check the amount, complete the requested wallet verification, and confirm payment. The verification steps depend on the current wallet flow; do not require your own DANA PIN or verification-code form.
Customers may leave before completing wallet verification or payment. Opening the wallet page, completing verification, or returning to your site does not confirm payment. Keep the order awaiting confirmation until your server retrieves the result.
Process the order using a signature-verified payment result webhook. If no notification has arrived or you need to check the result, call Query payments with the stored paymentId. Fulfill the order only after your server confirms a successful payment. For verification, acknowledgement, idempotency, and query fallback, see Webhooks.
Subscriptions
For self-managed subscriptions through the Direct API, call List available payment methods with subProductType=SUBSCRIBE and the actual order and client parameters. Continue only if the response includes DANA.
Follow Local payment method subscriptions for subscription authorization, contract credentials, and merchant-initiated charges. The one-time payment steps above use subProductType=DIRECT; subscription requests use subProductType=SUBSCRIBE and subscription.selfExecute=2.
Refunds and disputes
Confirm the refund capabilities, restrictions, and dispute process applicable to your merchant with Onerway. If refunds are enabled, follow Refunds.
Testing and go-live
Confirm the test environment and available DANA test procedure with Onerway, then follow Sandbox testing:
- Create an order with IDR and the required customer details. For the Direct API, handle the actual response and verify that
R + RedirectURLopens the returned address. For Checkout, confirm thatredirectUrlopens the payment page and that DANA is available. For the Web SDK, confirm thatready.availablePaymentMethodscontainsDANA, then select it and callconfirmPayment()from your payment button. - Check that the payment flow opens DANA with the expected payment information. With the Web SDK, handle the returned
nextActionand keep the SDK Checkout instance and leave the Payment Element mounted when the SDK presents the payment interface. Complete the agreed wallet verification and payment test, then confirm the result on your server. A rendered wallet page or successful verification alone does not pass the successful-payment check. - Test a customer leaving before authorization, failed authentication or payment, and a return to your site before a final result. Verify query fallback when no notification has arrived and idempotent handling of duplicate notifications.
- For go-live acceptance, retain the notification and acknowledgement for the same order. Query the payment status and check that it matches the notification. Check production enablement, notification and return URLs, limits, and validity periods. Test refunds separately if they are enabled.
Touch ’n Go eWallet
Accept one-time Touch ’n Go eWallet payments through Checkout or the Web SDK with customer details supplied in advance, and confirm the wallet-payment result on your server.
Akulaku
Accept one-time Akulaku purchases through the Direct API or Checkout with customer details supplied in advance, and confirm the result on your server.