API Reference (NEW)
ID - Indonesia
  • ID - Indonesia
  • GL - Global
DashboardProduct Docs
Resources
  • Github
  • Demo Site
  • Simulator
DashboardProduct Docs
Resources
  • Github
  • Demo Site
  • Simulator
ID - Indonesia
  • ID - Indonesia
  • GL - Global
  1. Account Binding
  • Introduction
  • Getting Started
    • Create Account
    • Authentication & API Keys
    • Make your first API call
    • Postman Collection
  • Checkout API
    • Build a Checkout Page
      • Checkout Page
      • Initiate Payment
  • Direct API
    • Cards
      • Payment Form
        • Step 1 - Generate Payment Page
      • Host-to-host Payment
    • Bank Transfer
      • BCA Virtual Account
        • DOKU Generate Payment Code
          • Step 1 - Get Token
          • Step 2 - Create VA (DGPC)
          • Additional - Payment Notification
          • Additional - Delete Payment Code
          • Additional - Update Payment Code
        • Merchant Generate Payment Code
          • Step 1 - Get Token
          • Step 2 - Create VA (MGPC)
          • Additional - Payment Notification
          • Additional - Delete Payment Code
          • Additional - Update Payment Code
        • Direct Inquiry
          • Inquiry Payment
          • Additional - Payment Notification
          • Additional - Delete Payment Code
          • Additional - Update Payment Code
      • BNC Virtual Account
        • Merchant Generated Payment Code
          • Step 2 - Create VA (DGPC)
        • DOKU Generated Payment Code
          • Step 1 - Get Token
          • Step 2 - Create VA (DGPC)
        • Direct Inquiry
          • Step 1 - Get Token
          • Step 2 - Create VA (DGPC)
      • BNI Virtual Account
        • Merchant Generated Payment Code
          • Step 1 - Get Token
          • Step 2 - Create VA (DGPC)
        • DOKU Generated Payment Code
          • Step 1 - Get Token
          • Step 2 - Create VA (DGPC)
        • Direct Inquiry
          • Step 1 - Get Token
          • Step 2 - Create VA (DGPC)
      • BRI Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
      • BSI Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
      • BTN Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
      • DANAMON Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
      • MANDIRI Virtual Account
        • Merchant Generated Payment Code
          • Step 1 - Get Token
          • Step 2 - Create VA (DGPC)
        • DOKU Generated Payment Code
        • Direct Inquiry
      • MAYBANK Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
      • PERMATA Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
      • SINARMAS Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
      • CIMB SNAP Virtual Account
        • Step 1 - Init KJUR
        • Step 2 - Get Token
        • Step 3 - Create VA (DGPC)
    • Convenience Store
      • Alfa Group
        • Alfa - Generate Payment Code
      • Indomaret
        • Indomaret - Generate Payment Code
    • e-Wallet
      • OVO
        • One Time Payment
          • OVO - Payment
          • OVO - Void
        • Account Binding
          • Step 1 - Account Binding
            POST
          • Step 2 - Balance Inquiry
            POST
          • Step 3 - Payment
            POST
          • Additional - Refund
            POST
          • Additional - Account Unbinding
            POST
      • Shopee Pay
        • Shopee Pay - Create Order
    • Direct Debit
      • BRI Direct Debit
        • Register Card - Create Token
        • Register Card - Validate OTP
        • Register Card - Resend OTP
        • Get Card List
        • Payment - Create Payment
        • Payment - Validate OTP
        • Payment - Resend OTP
        • Payment - Create Recurring Payment
        • Delete Card
      • CIMB Snap Direct Debit
        • Get Token B2B
        • Account Binding
        • Get Token B2B2C
        • Payment
        • Verify OTP Payment
        • Refund
        • Account Unbinding
        • Verify OTP Unbinding
      • ALLO Snap Direct Debit
        • Step 1 - Account Binding
        • Step 2 - Balance Inquiry
        • Step 3 - Payment
        • Additional - Refund
        • Additional - Account Unbinding
      • BRI Snap Direct Debit
        • Get Token B2B
        • Card Binding
        • Verify OTP Binding
        • Get Token B2B2C
        • Payment
        • Verify OTP Payment
        • Refund
        • Card Unbinding
      • Mandiri Snap Direct Debit
        • Get Token B2B
        • Card Binding
        • Request OTP Binding
        • Verify OTP Binding
        • Get Token B2B2C
        • Payment
        • Request OTP Payment
        • Verify OTP Payment
        • Cancel
        • Card Unbinding
      • Dana Snap Direct Debit
        • Get Token B2B
        • Payment
        • Refund
      • ShopeePay Snap Direct Debit
        • Get Token B2B
        • Payment
        • Refund
    • PayLater
      • Generate Order
      • Cancellation
      • Refund
    • Kartu Kredit Indonesia
      • Get Token B2B
      • Binding Only
      • Payment AFP with Binding
      • Payment AFP
      • Payment with token
      • Payment without AFP
      • Refund
      • Unbinding
    • Online Refund
      POST
  • Payout API
  • Check Status API
    • Payment
      GET
  • Partner API
  • Biller API
  • Wallet Service API
  • Webhooks
    • Sub Account API
      • Money In
        • Accept Payment
      • Money Out
      • Balance
  • Use Case Guides
  • Error Handling
    • Error Codes Glossary
  • FAQ / Troubleshooting
  • Change Log
    • ID - Indonesia Version
  • Archive
    • Get Token B2B
    • Get Token B2B2C
    • Step 1 - Account Binding
    • Step 2 - Balance Inquiry
    • Step 3 - Payment
    • Additional - Refund
    • Additional - Account Unbinding
    • Get Token B2B
    • Get Token B2B2C
    • Account Binding
    • Balance Inquiry
    • Payment
    • Refund
    • Account Unbinding
  1. Account Binding

Step 3 - Payment

POST
/direct-debit/core/v1/debit/payment-host-to-host

Request

Header Params
X-TIMESTAMP
string <utc timestamp>
required
Client's current local time in yyyy-MM- ddTHH:mm:ssTZD format
Example:
2020-12-21T07:56:11.000Z
X-SIGNATURE
string 
required
Algorithm symmetric signature HMAC_SHA512 (clientSecret, stringToSign)
Example:
85be817c55b2c135157c7e89f52499bf0c25ad6eeebe04a986e8c862561b19a5
X-PARTNER-ID
string 
required
Unique ID for a partner (DOKU'S Client ID)
Example:
821508239190
X-EXTERNAL-ID
string 
required
Numeric String. Reference number that should be unique in the same day (request-id)
Example:
418075533589
Authorization-customer
string 
required
Access Token obtained from Get B2B2C Token API | Go to here for detailed documentation
Example:
Bearer fa8sjjEj813Y9JGoqwOeOPWbnt4CUpvIJbU1mMU4a11MNDZ7Sg5u9a
Authorization
string 
required
Access Token obtained from Get B2B Token API | Go to here for detailed documentation
Example:
95221
Body Params application/json
partnerReferenceNo
string 
required
Partner Reference No from partner | max: 64 | Mandatory
Example:
INV-0001
feeType
string 
optional
Fee type from partner | value should be: OUR/BEN/SHA
Example:
OUR
amount
object (AmountObject) 
required
value
string 
required
Transaction Amount. Total Amount with 2 decimal, format ISO 4217 | Mandatory | min length: 1 | max length: 16.2
Example:
10000.00
currency
string 
required
Currency. | Mandatory | min length: 1 | max length: 3
Example:
IDR
payOptionDetails
array [object {3}] 
required
payMethod
string 
optional
Pay method format: CASH / POINTS
Example:
CASH
transAmount
object (AmountObject) 
optional
feeAmount
object (AmountObject) 
optional
additionalInfo
object 
required
channel
string 
required
Value should be always EMONEY_OVO_SNAP | Mandatory
Example:
EMONEY_OVO_SNAP
successPaymentUrl
string 
required
Redirect Url if payment success
Example:
www.merchant.com/success
failedPaymentUrl
string 
required
Redirect Url if payment fail
Example:
www.merchant.com/failed
paymentType
string 
optional
Transaction Type | Value should be SALE/RECURRING
Example:
SALE/RECURRING
Example
{
    "partnerReferenceNo": "INV-0001",
    "feeType": "OUR",
    "amount": {
        "value": "10000.00",
        "currency": "IDR"
    },
    "payOptionDetails": [
        {
            "payMethod": "CASH",
            "transAmount": {
                "value": "10000.00",
                "currency": "IDR"
            },
            "feeAmount": {
                "value": "10000.00",
                "currency": "IDR"
            }
        }
    ],
    "additionalInfo": {
        "channel": "EMONEY_OVO_SNAP",
        "successPaymentUrl": "www.merchant.com/success",
        "failedPaymentUrl": "www.merchant.com/failed",
        "paymentType": "SALE/RECURRING"
    }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/direct-debit/core/v1/debit/payment-host-to-host' \
--header 'X-TIMESTAMP;' \
--header 'X-SIGNATURE;' \
--header 'X-PARTNER-ID;' \
--header 'X-EXTERNAL-ID;' \
--header 'Authorization-customer;' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--data-raw '{
    "partnerReferenceNo": "INV-0001",
    "feeType": "OUR",
    "amount": {
        "value": "10000.00",
        "currency": "IDR"
    },
    "payOptionDetails": [
        {
            "payMethod": "CASH",
            "transAmount": {
                "value": "10000.00",
                "currency": "IDR"
            },
            "feeAmount": {
                "value": "10000.00",
                "currency": "IDR"
            }
        }
    ],
    "additionalInfo": {
        "channel": "EMONEY_OVO_SNAP",
        "successPaymentUrl": "www.merchant.com/success",
        "failedPaymentUrl": "www.merchant.com/failed",
        "paymentType": "SALE/RECURRING"
    }
}'

Responses

🟢200OK
application/json
Successfull
Body
responseCode
string 
required
Response Code with format HTTP status code + service code + case code. service code and status code refer to: https://developers.doku.com/getting-started-with-doku-api/response-code/http-status-and-case-code#id-3.-e-wallet | Mandatory | min length: 1 | max length: 7.
Example:
2005400
responseMessage
string 
required
Response Description. | min length: 1 | max length: 150
Example:
Successfull
webRedirectUrl
string 
optional
Redirect URL to Merchant's page/platform for customer to input OTP/PIN
Example:
https://app-uat.doku.com/link/283702597342040
partnerReferenceNo
string 
optional
Reference No From Partner
Example:
INV-0001
Example
{
    "responseCode": "2005400",
    "responseMessage": "Successfull",
    "webRedirectUrl": "https://app-uat.doku.com/link/283702597342040",
    "partnerReferenceNo": "INV-0001"
}
Modified at 2025-07-22 07:08:30
Previous
Step 2 - Balance Inquiry
Next
Additional - Refund
Built with