WooshPay OpenAPI
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Product DocumentAPI ReferenceJS SDK ReferenceSaaS Platform Integration
Back to WooshPay Website
  1. Wallets
  • Online payments
    • Quick Start
    • Integration overview
    • Wooshpay JS SDK
    • Wooshpay Checkout
    • Wooshpay Direct API
    • Payment Link
    • Authorize and capture
    • Build subscriptions integration
    • Testing cards
  • After the payment
    • Payouts
    • Webhook
    • Check the webhook signatures
    • 校验webhook签名
  • Add more payment methods
    • Supported payment method
    • Cards
    • Wallets
      • Alipay
      • Alipay HK
      • Apple Pay
      • Google Pay
      • Wechat Pay
      • 微信支付
      • Kakao Pay
      • DANA
      • Boost
      • Grabpay
      • Mcash
      • Touch'n Go
      • ShopeePay
      • UnionPay
      • 9Pay
      • OVO
      • GCash
      • TrueMoney
    • Bank redirects
      • Bancontact
      • BPI
      • Trustly
      • EPS
      • Giropay
      • iDEAL
      • Przelewy24
      • FPX
    • Buy Now Pay Later
      • Klarna
    • Bank Debits
      • Sepa Direct Debit
    • Bank Transfer
      • Bank Transfer in Europe
      • Bank Transfer in United Kingdom
      • Bank Transfer in Indonesia
    • QR Payments
      • QRIS
      • PromptPay
    • Real-time payments
      • PIX
      • PayNow
      • UPI
      • SPEI
  • More payment scenarios
    • Set up future payments
    • Save payment method during payment
  • SaaS platform integration
    • Shopify Plugin
    • Shopastro 星盘
    • WooCommerce
    • Shoplazza 店匠
    • Shopline Plugin
    • Sage Connection
  • Resources
    • Supported currencies
  1. Wallets

DANA

Learn about DANA, a digital wallet popular with customers from Indonesia.#

DANA is an Indonesian digital wallet with over 30 million users. It is an all-in-one app that allows users to safely make cashless and cardless payments for everyday usage. With Dana, it's possible to pay online, in-store, and make mobile top ups and bill payments.

Features#

Processing currenciesIDR
Settlement currenciesUSD
Minimum transaction amount100 IDR
Maximum transaction amount300,000,000 IDR
Refunds✅
Partial Refunds✅
Multiple partial refund❌
Chargeback❌

Integration Method#

Payment method enumeration values: dana
There are two integration methods for DANA
1.
Direct API
2.
Checkout

Direct API#

Payment flow#

1.
For direct API integration, after creating payment intent by OpenAPI, customers will be redirected to DANA login page
output.png
2.
The client logs in to his/her DANA account and completes payment
1971ccc8-c811-4385-80e4-63b61f036502.png
output (1).png
3.
Payment succeeds and the client is redirected back to the page you designated
output (2).png

How to integration#

For direct API integration, you can create a PaymentIntent and get url in only one step. The following is the demo of creating payment intent:
Create a PaymentIntent
A PaymentIntent is an object that represents your intent to collect payment from your customer and tracks the lifecycle of the payment process. Create a PaymentIntent on your server and specify the amount to collect and a supported currency. If you have an existing Payment Intents integration, add dana to the list of payment method types.
Request
{
    "amount":100,
    "currency":"IDR",
    "confirm":true,
    "payment_method_data" : {
        "type":"dana"
    },
    "return_url":"https://your.website"
}
Response
{
    "id": "pi_1646356544343769088",
    "object": "payment_intent",
    "created": 1681356963000,
    "currency": "IDR",
    "amount": 100,
    "status": "requires_action",
    "livemode": true,
    "client_secret": "pi_1646356544343769088_secret_m58mCj87dL3cj5JiUOtbdx2e",
    "next_action": {
        "type": "redirect_to_url",
        "dana_handle_redirect": {
            "url": "https://XXXXXXXXXXXXXXXXXXX"
        }
    },
    "payment_method_types": [
        "dana"
    ],
    "confirmation_method": "automatic",
    "return_url": "https://your.website",
    "payment_method": "pm_1646356544205357056",
    "capture_method": "automatic"
}

Checkout#

Payment flow#

1.
Customer selects DANA from the list of payment methods available and clicks on the Pay botton
output (3).png
2.
Customers will be redirected to DANA login page
output.png
3.
The client logs in to his/her DANA account and completes payment
1971ccc8-c811-4385-80e4-63b61f036502.png
output (1).png
4.
Payment succeeds and the client is redirected back to the page you designated
output (2).png

Create a Session#

Request
{
    "cancel_url": "www.wooshpay.com",
    "mode": "payment",
    "success_url": "https://wooshpay.com/",
    "payment_method_types": [
        "dana"
    ],
    "line_items": [
        {
            "price_data": {
                "currency": "IDR",
                "unit_amount": 20000,
                "nickname": "apple",
                "product_data": {
                    "name": "apple"
                },
                "billing_scheme": "testscheme",
                "lookup_key": "test_lookup_key"
            },
            "quantity": 1
        }
    ]
}
Response
{
    "id": "cs_1676131330724724736",
    "object": "checkout.session",
    "created": 1688455825000,
    "livemode": false,
    "currency": "IDR",
    "customer": "",
    "mode": "payment",
    "status": "open",
    "url": "https://checkouttest.wooshpay.com/XXXXXXXXXXXXXXXXXXX",
    "cancel_url": "www.wooshpay.com",
    "line_items": {
        "object": "list",
        "data": [
            {
                "id": "li_1676131330754084864",
                "object": "item",
                "currency": "IDR",
                "description": "apple",
                "price": {
                    "id": "price_1676131330766667776",
                    "object": "price",
                    "created": 1688455825000,
                    "livemode": false,
                    "active": true,
                    "currency": "IDR",
                    "nickname": "apple",
                    "product": {
                        "id": "prod_1676131330783444992",
                        "object": "product",
                        "created": 1688455825000,
                        "livemode": false,
                        "active": true,
                        "name": "apple",
                        "updated": 1688455825000
                    },
                    "type": "one_time",
                    "unit_amount": 20000,
                    "billing_scheme": "per_unit",
                    "lookup_key": "test_lookup_key"
                },
                "quantity": 1,
                "amount_subtotal": 20000,
                "amount_total": 20000
            }
        ]
    },
    "payment_intent": "pi_1676131330947022848",
    "payment_method_types": [
        "dana"
    ],
    "payment_status": "unpaid",
    "success_url": "https://wooshpay.com/",
    "amount_subtotal": 20000,
    "amount_total": 20000,
    "billing_address_collection": "auto",
    "expires_at": 1688542224918,
    "payment_link": "",
    "client_secret": "pi_1676131330947022848_secret_ENUbfvBKA7zljcENnlrG3K7q"
}

Next step#

You can add more features to your integration as needed

Create a Webhook#

Listen to events on your WooshPay account so your integration can automatically trigger reactions. Create a webhook that mainly focuses on enabled_events and url.

Create a Refund#

Create a refund to repay funds to your customer. You can also perform partial refunds, but not every payment method supports them. A partial refund is when you refund only part of the original transaction amount.
Modified at 2024-03-11 02:01:50
Previous
Kakao Pay
Next
Boost
Built with