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. Payment Form
  • 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
          POST
      • 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
          • Step 2 - Balance Inquiry
          • Step 3 - Payment
          • Additional - Refund
          • Additional - Account Unbinding
      • 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. Payment Form

Step 1 - Generate Payment Page

POST
/credit-card/v1/payment-page
Header ParameterTypeDescription
Client-IdstringThe Client ID you retrieved from DOKU Back Office
MANDATORY
Request-IdstringRandom string that must unique per request for idempotency
MANDATORY ALPHA NUMERIC 40 chars
Request-TimestampstringRequest time in ISO8601 format with UTC + 0
MANDATORY
SignaturestringSecurity parameter to ensure the request's authenticity. Learn more how to generate Signature here
MANDATORY

Request

Header Params
Client-Id
string 
required
Example:
{{client_id}}
Request-Id
string 
required
Example:
{{request_id}}
Request-Timestamp
string 
required
Example:
{{request_timestamp}}
Signature
string 
required
Example:
{{signature}}
Body Params application/json
order
object 
required
invoice_number
string 
required
line_items
array [object {3}] 
required
amount
integer 
required
callback_url
string 
required
auto_redirect
boolean 
required
session_id
string 
required
customer
object 
required
id
string 
required
name
string 
required
email
string 
required
phone
string 
required
address
string 
required
country
string 
required
override_configuration
object 
required
themes
object 
required
Example
{ 
    "order": {
       	"invoice_number":"INV-{{$timestamp}}",
       	"line_items": [
			{
      		"name": "DOKU T-Shirt Merah",
      		"price": 30000,
      		"quantity": 2
    		},
			{
      		"name": "DOKU T-Shirt Biru",
      		"price": 30000,
      		"quantity": 1
    		}
  		],
       	"amount": 90000,
       	"callback_url": "https://doku.com",
       	"auto_redirect": false,
       	"session_id": "0000231223"
    },
    "customer": {
    	"id":"W7rbKhPYh76VSHYwHRaGDIbBhgTebgAoWtX",
    	"name":"Anton Budiman",
    	"email":"anton@doku.com",
    	"phone":"+6281287458232",
		"address":"Jakarta, Menara Mulia Lt 8",
		"country":"ID"
	},
    "override_configuration": {
        "themes": {
            "language": "ID",
            "background_color": "",
            "font_color": "",
            "button_background_color": "",
            "button_font_color": ""
        }
    }
}

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 '/credit-card/v1/payment-page' \
--header 'Client-Id: {{client_id}}' \
--header 'Request-Id: {{request_id}}' \
--header 'Request-Timestamp: {{request_timestamp}}' \
--header 'Signature: {{signature}}' \
--header 'Content-Type: application/json' \
--data-raw '{ 
    "order": {
       	"invoice_number":"INV-{{$timestamp}}",
       	"line_items": [
			{
      		"name": "DOKU T-Shirt Merah",
      		"price": 30000,
      		"quantity": 2
    		},
			{
      		"name": "DOKU T-Shirt Biru",
      		"price": 30000,
      		"quantity": 1
    		}
  		],
       	"amount": 90000,
       	"callback_url": "https://doku.com",
       	"auto_redirect": false,
       	"session_id": "0000231223"
    },
    "customer": {
    	"id":"W7rbKhPYh76VSHYwHRaGDIbBhgTebgAoWtX",
    	"name":"Anton Budiman",
    	"email":"anton@doku.com",
    	"phone":"+6281287458232",
		"address":"Jakarta, Menara Mulia Lt 8",
		"country":"ID"
	},
    "override_configuration": {
        "themes": {
            "language": "ID",
            "background_color": "",
            "font_color": "",
            "button_background_color": "",
            "button_font_color": ""
        }
    }
}'

Responses

🟢200Success
application/json
Body
object {0}
Example
{}
Modified at 2025-07-22 07:03:47
Previous
Direct API
Next
Step 1 - Get Token
Built with