DANA

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.

特徴 #

通貨の処理IDR
決済通貨米ドル
最低取引額100 IDR
最大取引額300,000,000 IDR
払い戻し
一部払い戻し
複数回の一部払い戻し
チャージバック

統合方式 #

支払い方法の列挙値: dana

There are two integration methods for DANA

  1. ダイレクトAPI
  2. チェックアウト

ダイレクト API #

支払いの流れ #

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

統合の方法 #

直接APIを統合するには、PaymentIntentを作成し、1つのステップでURLを取得することができます。以下はペイメントインテントを作成するデモです:

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.

リクエスト

{
    "amount":100,
    "currency":"IDR",
    "confirm":true,
    "payment_method_data" : {
        "type":"dana"
    },
    "return_url":"https://your.website"
}

応答

{
    "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://m.dana.id/m/portal/cashier/checkout?bizNo=20230413111212800110166041377848845&timestamp=1681356963277&originSourcePlatform=IPG&mid=216620000562418247453&sign=LY3%2FomMnXVJqk9uEOZJopCnSb%2FBDk64I9nIhBZdHc3wi%2Fo%2BcIVCBmCWTacAxHv%2BAKV0auNlCbkyrKvdK2B1X7aoiDv2dxO%2BAfdc7dkmny4FzOJ%2BrxNBmWerSkoexkEw1u52TMIWwLnDzwXYiGTsrs%2Bhzkew4okaJ2w9i4hMJh%2FLDRym0XwYaX9h7N0MCkrXYNY%2FfrEdY8BW%2BazU2wYWdDH%2B4fkgSs7D9YxXj%2Fu2eon2JaGuWYht93piOji22pGW9hD1ubH1vi4lZwFfp96Lp1fsgzV2uvRv6d8CTXSQw%2Fg9oeI3jFXw1bHqBZocv51QZl3AfKvXauWBSVClj4CziDw%3D%3D&forceToH5=false"
        }
    },
    "payment_method_types": [
        "dana"
    ],
    "confirmation_method": "automatic",
    "return_url": "https://your.website",
    "payment_method": "pm_1646356544205357056",
    "capture_method": "automatic"
}

チェックアウト #

支払いの流れ #

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

セッションの作成 #

リクエスト

{
    "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
        }
    ]
}

応答

{
    "id": "cs_1676131330724724736",
    "object": "checkout.session",
    "created": 1688455825000,
    "livemode": false,
    "currency": "IDR",
    "customer": "",
    "mode": "payment",
    "status": "open",
    "url": "https://checkouttest.wooshpay.com/pay/cs_test_1676131330724724736?key=pk_test_NTE2MjA5NzY5MzgxOTk5NDUyMTYxOnhXNjdQQ3JndjBVZ04wcVVwNk5yaG9PdjE2NzUzMDU5OTc0NTI",
    "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"
}

次のステップ #

必要に応じて、統合にさらに機能を追加することができます。

ウェブフックの作成 #

統合が自動的にリアクションをトリガーできるように、WooshPayアカウントのイベントをリッスンします。enabled_eventsとurlにフォーカスしたWebhookを作成します。

払い戻しの作成 #

顧客に資金を返済するために返金を作成します。部分払い戻しを行うこともできますが、すべての支払い方法が対応しているわけではありません。部分払い戻しとは、元の取引金額の一部のみを払い戻すことです。

どのようなお気持ちですか?
Updated on 8月 8, 2023