DOKU Malaysia API Reference
Home
Products
Products
  • Checkout
  • Payment
  • Cards Payment
DOKU Docs
Home
Products
Products
  • Checkout
  • Payment
  • Cards Payment
DOKU Docs
  1. Payment
  • Introduction
  • Getting Started
    • Create Account
    • Make your first API call
    • Authentication & API Keys
  • Checkout
    • Overview
    • Create Checkout
      POST
    • Retrieve Checkout Status
      GET
  • Payment
    • Overview
    • Create Payment
      POST
    • Get Bank List - FPX
      POST
    • Retrieve Payment Status
      GET
  • Cards Payment
    • Overview
    • Payment Form
      • Request Payment
    • Host-to-Host Payment
      • Check Three D Secure
      • Charge Payment
      • Capture Authorized Payment
    • Request Refund
      POST
    • Unbind Token
      POST
    • Check Status
      GET
  • Payout
    • Overview
    • Inquire Beneficiary Account
      POST
    • Send Payout
      POST
    • Read Payout Status
      GET
    • Read Available Balance
      GET
  • Notification
    • Overview
    • Retry Notification
    • Setup Notification URL
    • Sample Notification - Global
      POST
    • Sample Notification - Cards
      POST
  • Technical Reference
    • Authentication & Integrity
    • Idempotency
    • Data Type
    • Order & Transaction Status
    • Postman Collection
    • Response Code
      • Error Code
      • Payout Response Code
      • Credit Card Acquirer Response Code
    • API Version
      • Create Checkout
      • Create Payment
      • Get Bank List - FPX
      • Retrieve Checkout
      • Retrieve Payment
      • Inquire Beneficiary Account
      • Send Payout
      • Read Payout Status
      • Read Available Balance
    • Signature
      • Signature - Global
        • Prepare Signature Component
        • Generating Signature
        • Validating Signature
        • Sample Code
      • Signature - Cards Payment API
        • Signature Component from Response Header
        • Signature from API Get Method
        • Sample Code
        • Signature Component from Request Header
  1. Payment

Create Payment

POST
/v3/payments
Environment
Sandbox - https://api-sandbox.doku.com
Production - https://api.doku.com

Request

Authorization
API Key
Add parameter in header
Signature
Example:
Signature: ********************
API Key
Add parameter in header
Client-Id
Example:
Client-Id: ********************
Basic Auth
Send your HTTP requests with an
Authorization
header that contains the word Basic followed by a space and a base64-encoded string username:password
Example:
Authorization: Basic *****************
or
Header Params

Body Params application/json

Examples
{
    "id": "8fdC56eo-cC99-46E1-B6AC-4asD871212",
    "order": {
        "amount": 60.20,
        "currency": "MYR",
        "invoice_number": "INV-20210231-02132",
        "expired_at": "2026-09-17T07:30:45Z"
    },
    "payment": {
        "channel": "BNPL_GRABPAY"
    },
    "customer": {
        "name": "John Doe",
        "email": "customer_email@test.com",
        "phone": "+60812345678"
    }
}

Request Code 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
curl --location '/v3/payments' \
--header 'Request-Timestamp: {{$date.isoTimestamp}}' \
--header 'Idempotency-Id;' \
--header 'API-Version: arabica.2025-12-01' \
--header 'Signature: <api-key>' \
--header 'Client-Id: <api-key>' \
--header 'Authorization: Basic <encoded-value>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "id": "8fdC56eo-cC99-46E1-B6AC-4asD871212",
    "order": {
        "amount": 60.20,
        "currency": "MYR",
        "invoice_number": "INV-20210231-02132",
        "expired_at": "2026-09-17T07:30:45Z"
    },
    "payment": {
        "channel": "BNPL_GRABPAY"
    },
    "customer": {
        "name": "John Doe",
        "email": "customer_email@test.com",
        "phone": "+60812345678"
    }
}'

Responses

🟢200Success
application/json
Bodyapplication/json

Example
{
    "id": "8fdC56eo-cC99-46E1-B6AC-4asD8755B25C",
    "order": {
        "amount": 60.20,
        "invoice_number": "INV-20210231-0001",
        "currency": "MYR",
        "line_items": [
            {
                "id": "1",
                "name": "Chitato",
                "quantity": 2,
                "price": 20.05
            },
            {
                "id": "2",
                "name": "Cheetoz",
                "quantity": 2,
                "price": 10.05
            }
        ],
        "expired_at": "2026-09-17T07:30:45Z"
    },
    "payment": {
        "channel": "BNPL_GRABPAY",
        "type": "SALE",
        "initiation_type": "customer_initiate",
        "amount": 60.20,
        "currency": "MYR",
        "status": "PENDING",
        "state": "INITIATE",
        "doku_reference_id": "019bc05bdb717aa483c943c757d93c63",
        "next_action": {
            "required": true,
            "type": "auth_redirection",
            "url": "https://api-uat.doku.com/my/payment-perform?clientId=BRN-0201-1766134655420&referenceId=ZTkwMjc2NWI3ODBjZTkzZDFjY2UwM2Y0N2FjYTZlYWMzNGM2ZTc1MzI5NzNiNDMyNmNmYWZiYmI0MGZmMmY1YjUzNmVjMTllM2RkZmRjNDZiOTEyMjQ5ZGE4NThhMmExNDdkNDYyOThjZDdlNDJiYWI3NjMxODI0ZjU0NWMyMTI="
        },
        "callback_url": "https://merchant-callback-url.com"
    },
    "metadata": {
        "key_1": "value_1",
        "key_2": "value_2",
        "key_3": "value_3"
    },
    "customer": {
        "id": "DOKU-CUST-001",
        "name": "John Doe",
        "email": "customer_email@test.com",
        "phone": "+60812345678",
        "country": "MY",
        "address": "Street 1"
    }
}
🟠400Bad Request
🟠401Invalid Authentication & Signature
🟠404Transaction Errors
🔴500Internal Errors
Modified at 2026-10-28 09:45:11
Previous
Overview
Next
Get Bank List - FPX
Built with