Dana for Payment Setup API
Last updated: April 30, 2026
To accept Dana payments, you must:
- Create a payment setup.
- Confirm the payment.
- Redirect the customer to Dana.
Call the Create a payment setup endpoint.
Information
Your base URL's {prefix} value is unique to your account and environment. To learn how to retrieve your base URLs for the sandbox and production environments, see API endpoints.
post
https://{prefix}.api.checkout.com/payments/setups
1{2"amount": 110000,3"currency": "IDR",4"payment_methods": {5"dana": {6"terminal_type": "app"7}8},9"settings": {10"success_url": "https://example.com/payments/success",11"failure_url": "https://example.com/payments/failure"12}13}
In the request body, provide the following:
| Field | Description |
|---|---|
number | The payment amount, in the minor currency unit. |
string | Three-letter ISO 4217 currency code. |
string | The type of terminal used for the payment.
|
string | The URL to redirect the customer to if the payment fails. |
string | The URL to redirect the customer to if the payment is successful. |
string | A description of the payment. |
string | The operating system of the customer's device.
|
string | A reference you can use to identify the payment. |
1{2"id": "set_rcmepwrchqab2wsergcafvijfy",3"processing_channel_id": "pc_wzjki6hw5puepb5fnvqlizj2e4",4"amount": 110000,5"currency": "IDR",6"payment_type": "Regular",7"reference": "ORDER_01234",8"description": "Dana payment",9"payment_methods": {10"dana": {11"status": "ready",12"flags": []13}14},15"available_payment_methods": [16"dana"17],18"settings": {19"success_url": "https://example.com/payments/success",20"failure_url": "https://example.com/payments/failure"21}22}
The response returns a payment_methods object, which contains the payment methods enabled on your account.
When all required fields are present, the payment_methods.dana object shows a ready status.
Confirm the payment by calling the Confirm a payment setup endpoint and provide:
- The payment setup
idas the{id}path parameter. danaas the{payment_method_name}path parameter.
post
https://{prefix}.api.checkout.com/payments/setups/{id}/confirm/dana
1{2"id": "pay_sxzrgliy2w3e5gpnby3chlswwq",3"status": "Pending",4"reference": "ORDER_01234",5"customer": {6"id": "cus_2g4ehcpm6phexgkzahlwxvbgne"7},8"_links": {9"self": {10"href": "https://{prefix}.api.checkout.com/payments/pay_sxzrgliy2w3e5gpnby3chlswwq"11},12"redirect": {13"href": "https://psp.ac.alipay.com/page/simulation-wallet/acwallet/alipayconnectcode.html?code=281666040095AHvh5AIKT0a3kv8X6Zzv3kiv&pspName=DANA&loadMode=2"14}15}16}
Redirect the customer to the redirect.href URL from the response. The customer completes the payment on the Dana page and is then redirected back to your settings.success_url or settings.failure_url.