DOKU Malaysia API Reference
Home
Products
Products
  • Checkout
  • Payment
  • Cards Payment
DOKU Docs
Home
Products
Products
  • Checkout
  • Payment
  • Cards Payment
DOKU Docs
  1. Notification
  • 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. Notification

Sample Notification - Global

POST
/merchants-url/receive-notification
After setting up your Notification URL, we will send the notification for certain events such as when the payment is succeed, failed, and etc.
Here is the sample notification that DOKU will send to merchant's server.

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

Example
{
    "id": "8fdC56eo-cC99-46E1-B6AC-4asD8755B25C",
    "order": {
        "amount": 100.05,
        "invoice_number": "INV-20210231-0001",
        "currency": "MYR",
        "expired_at": "2026-01-16T04:20:42.115Z"
    },
    "payment": {
        "channel": "EWALLET_SHOPEEPAY",
        "type": "SALE",
        "initiation_type": "customer_initiate",
        "amount": 100.05,
        "currency": "MYR",
        "status": "SUCCESS",
        "state": "COMPLETED"
    },
    "customer": {
        "id": "DOKU-CUST-001",
        "name": "John Doe",
        "email": "customer_email@test.com",
        "phone": "+60812345678",
        "country": "MY",
        "address": "Street 1"
    },
    "metadata": {
        "sample_key": "your value"
    }
}

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 --location '/merchants-url/receive-notification' \
--header 'Request-Timestamp: {{$date.isoTimestamp}}' \
--header 'API-Version: doku-global.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-4asD8755B25C",
    "order": {
        "amount": 100.05,
        "invoice_number": "INV-20210231-0001",
        "currency": "MYR",
        "expired_at": "2026-01-16T04:20:42.115Z"
    },
    "payment": {
        "channel": "EWALLET_SHOPEEPAY",
        "type": "SALE",
        "initiation_type": "customer_initiate",
        "amount": 100.05,
        "currency": "MYR",
        "status": "SUCCESS",
        "state": "COMPLETED"
    },
    "customer": {
        "id": "DOKU-CUST-001",
        "name": "John Doe",
        "email": "customer_email@test.com",
        "phone": "+60812345678",
        "country": "MY",
        "address": "Street 1"
    },
    "metadata": {
        "sample_key": "your value"
    }
}'

Responses

🟢200OK
This response does not have a body.
Modified at 2026-10-28 09:46:37
Previous
Setup Notification URL
Next
Sample Notification - Cards
Built with