Integration Guide
Creates a new sub-account for each party that will receive payments on your platform.
Once created, the sub-account receives:
A unique Profile ID
One or more Account Numbers (IDR, Pending IDR, Points)
A webhook notification is sent to your callback URL when registration is complete (see Webhook: Register Sub Account below).
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Your merchant-assigned reference number
REG-20240115-001Parent Profile ID for hierarchical accounts
PROF-PARENT-001Referral code. DOKU auto-generates if omitted
REF-AUTO-001Sub-account type. Use DEFAULT for standard sub-accounts.
DEFAULTEmail address of the account holder. Email address of the account holder.
vendor@example.comName of the account holder
Toko MakmurPhone number of the account holder (e.g., 081234567890)
081234567890ISO 3166-1 alpha-2 country code (e.g., ID for Indonesia)
IDSub-account registered successfully
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulProfile ID of the parent sub-account, if the account is nested
PROF-PARENT-001Newly created Profile ID. Use this to reference the sub-account in future API calls (e.g., Balance Inquiries).
PROF-00123Bad Request
Unauthorized
Duplicate partnerReferenceNo
POST /sub-account/v2.0/register HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 218
{
"partnerReferenceNo": "REG-20240115-001",
"parentProfileId": "PROF-PARENT-001",
"referralCode": "REF-AUTO-001",
"type": "DEFAULT",
"email": "vendor@example.com",
"name": "Toko Makmur",
"phoneNo": "081234567890",
"countryCode": "ID"
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"parentProfileId": "PROF-PARENT-001",
"profileId": "PROF-00123",
"accounts": [
{
"type": "DOKU_MERCHANT_IDR",
"currency": "IDR",
"accountNo": "1234567890"
}
]
}Validate and retrieve beneficiary details before executing a transfer. This ensures the destination account is valid and the details are correct.
The response includes a referenceNo that must be used in the Transfer Payment request.
Supports four transfer types:
BANK_ACCOUNT— To any of 100+ Indonesian banksDOKU_SUB_ACCOUNT— Between sub-accounts on your platform (setcurrency: POINTfor a point P2P transfer)DOKU_WALLET— To a DOKU e-walletDOKU_NON_FIAT— Point top-up. Issues new points from yourDOKU_SYSTEM_POINTaccount;fromAccountis selected automatically and any supplied value is overridden
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Unique transaction identifier. Must be unique per request
TRF-20240115-001Transfer destination type: BANK_ACCOUNT (external bank), DOKU_SUB_ACCOUNT (between sub-accounts), DOKU_WALLET (e-wallet), DOKU_NON_FIAT (point top-up from DOKU_SYSTEM_POINT)
BANK_ACCOUNTPossible values: Transfer channel. Defaults to BI_FAST
BI_FASTPossible values: Source sub-account number
1234567890Destination bank SWIFT/BIC code. Required for BANK_ACCOUNT type. Not needed for DOKU_SUB_ACCOUNT or DOKU_NON_FIAT. Full list: https://developers.doku.com/payout/kirim-doku#list-of-supported-banks
CENAIDJADestination account number
0987654321Transfer remarks
Seller payout JanuaryInquiry successful
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulDOKU-generated reference number. You MUST pass this value as referenceNo in the Transfer Payment request to execute this transfer.
DOKU-REF-00456Your reference number, echoed back from the request
TRF-20240115-001Transfer destination type — BANK_ACCOUNT, DOKU_SUB_ACCOUNT, DOKU_WALLET or DOKU_NON_FIAT
BANK_ACCOUNTTransfer channel (BI_FAST or ONLINE)
BI_FASTSource sub-account number
2010370282Destination account number
0987654321Account holder name as registered at the destination bank. Display this to the user for confirmation before calling Transfer Payment.
JOHN DOEBank SWIFT/BIC code. Full list: https://developers.doku.com/payout/kirim-doku#list-of-supported-banks
CENAIDJABad Request
Unauthorized
Account not found
POST /sub-account/v2.0/transfer-inquiry HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 259
{
"partnerReferenceNo": "TRF-20240115-001",
"type": "BANK_ACCOUNT",
"amount": {
"value": "500000.00",
"currency": "IDR"
},
"channel": "BI_FAST",
"fromAccount": "2010370282",
"beneficiaryBankCode": "CENAIDJA",
"beneficiaryAccountNumber": "0987654321",
"remark": "Payout to seller"
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"referenceNo": "DOKU-REF-00456",
"partnerReferenceNo": "TRF-20240115-001",
"type": "BANK_ACCOUNT",
"channel": "BI_FAST",
"fromAccount": "2010370282",
"beneficiaryAccountNumber": "0987654321",
"beneficiaryAccountName": "JOHN DOE",
"beneficiaryBankCode": "CENAIDJA",
"amount": {
"value": "500000.00",
"currency": "IDR"
}
}Execute a fund transfer after a successful Transfer Inquiry.
Requires the referenceNo from the inquiry response. Once processed:
Funds are deducted from the source sub-account
Funds are delivered to the destination
A webhook notification is sent to your callback URL (see Webhook: Transfer Payment below)
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Unique transaction identifier. Must be unique per request
TRF-20240115-002DOKU reference number from Transfer Inquiry
DOKU-REF-00456Transfer destination type — BANK_ACCOUNT, DOKU_SUB_ACCOUNT, DOKU_WALLET or DOKU_NON_FIAT
BANK_ACCOUNTPossible values: Transfer channel. BI_FAST = real-time national payment rail, ONLINE = standard bank transfer. Defaults to BI_FAST if omitted.
BI_FASTPossible values: Source sub-account number
1234567890Destination bank SWIFT/BIC code. Full list: https://developers.doku.com/payout/kirim-doku#list-of-supported-banks
CENAIDJADestination account number
0987654321Destination account holder name. Required. Use the name returned by Transfer Inquiry
JOHN DOETransfer executed successfully
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulDOKU-generated reference number for this transaction
DOKU-REF-00456Your reference number, echoed back from the request
TRF-20240115-002Transfer destination type — BANK_ACCOUNT, DOKU_SUB_ACCOUNT, DOKU_WALLET or DOKU_NON_FIAT
BANK_ACCOUNTTransfer channel (BI_FAST or ONLINE)
BI_FASTBank reference number
DK062747488Timestamp when the transaction was processed, ISO 8601
2024-01-15T10:35:00+07:00Bank SWIFT/BIC code. Full list: https://developers.doku.com/payout/kirim-doku#list-of-supported-banks
CENAIDJADestination account number
0987654321Destination account holder name
JOHN DOESource account number
1234567890Bad Request
Unauthorized
Exceeds transaction amount limit
Duplicate partnerReferenceNo
POST /sub-account/v2.0/transfer-payment HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 316
{
"partnerReferenceNo": "TRF-20240115-001",
"referenceNo": "85da590e22f746869421f12015daeae2",
"type": "BANK_ACCOUNT",
"channel": "BI_FAST",
"amount": {
"value": "500000.00",
"currency": "IDR"
},
"fromAccount": "2010370282",
"beneficiaryBankCode": "CENAIDJA",
"beneficiaryAccountNumber": "0987654321",
"beneficiaryAccountName": "JOHN DOE"
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"referenceNo": "DOKU-REF-00456",
"partnerReferenceNo": "TRF-20240115-002",
"type": "BANK_ACCOUNT",
"channel": "BI_FAST",
"amount": {
"value": "500000.00",
"currency": "IDR"
},
"referenceNumber": "DK062747488",
"transactionDate": "2024-01-15T10:35:00+07:00",
"beneficiaryBankCode": "CENAIDJA",
"beneficiaryAccountNumber": "0987654321",
"beneficiaryAccountName": "JOHN DOE",
"fromAccount": "1234567890"
}Create automated fund distribution rules for transactions. Once active, the rule applies automatically to all matching transactions — no batch, no manual intervention.
Supports two rule types:
PERCENTAGE — each party gets a percentage of the total
FLAT — each party gets a fixed amount
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001The transaction type this rule will match against. Use PAYMENT for split rules applied to incoming payments.
PAYMENTSplit rule created
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulUnique ID for this split rule
SR-a1b2c3d4-e5f6-7890Transaction type
MARKETPLACE_SALEBad Request
Unauthorized
POST /sub-account/v2.0/split-rules HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 158
{
"transactionType": "PAYMENT",
"rules": [
{
"type": "PERCENTAGE",
"value": 95,
"accountNumber": 1234567890
},
{
"type": "PERCENTAGE",
"value": 5,
"accountNumber": 1234567892
}
]
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"splitRuleId": "SR-a1b2c3d4-e5f6-7890",
"transactionType": "MARKETPLACE_SALE",
"rules": [
{
"type": "PERCENTAGE",
"value": 70,
"currency": "IDR",
"accountNumber": 1234567890
}
]
}Retrieve the current balance information for a sub-account.
Returns available and reserved balances for each account type (IDR, Pending IDR, Points).
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Profile ID of the sub-account
PROF-00123Specific account numbers to query. Omit to get all
["1234567890"]Balance retrieved
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulAccount holder name
Toko MakmurProfile ID of the sub-account
PROF-00123Bad Request
Unauthorized
POST /sub-account/v2.0/balance-inquiries HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 52
{
"profileId": "PROF-00123",
"accounts": [
"1234567890"
]
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"name": "Toko Makmur",
"profileId": "PROF-00123",
"accounts": [
{
"type": "DOKU_MERCHANT_IDR",
"currency": "IDR",
"accountNo": "1234567890",
"balance": {
"available": "850000.00",
"reserved": "150000.00"
}
}
]
}Check the real-time status of any Sub-Account transaction.
Returns the current status and, for cancelled debit transactions, the complete debit cancel history.
Status codes:
00
Success
03
Pending
04
Refunded
06
Failed
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Your unique transaction identifier
PUR-20240115-001Status retrieved
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulYour reference number, echoed back from the request
PUR-20240115-001Transaction type
PURCHASE00 = Success, 03 = Pending, 04 = Refunded, 05 = Canceled (Void Topup only), 06 = Failed. May be absent for voided transactions.
00Status description (e.g., success, void, pending)
successTimestamp when the transaction was processed, ISO 8601
2024-01-15T10:40:00+07:00Bad Request
Unauthorized
Transaction not found
POST /sub-account/v2.0/transactions-status HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 41
{
"partnerReferenceNo": "PUR-20240115-001"
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"partnerReferenceNo": "PUR-20240115-001",
"transactionType": "PURCHASE",
"latestTransactionStatus": "00",
"latestTransactionDesc": "success",
"transactionDate": "2024-01-15T10:40:00+07:00",
"amount": {
"value": "500000.00",
"currency": "IDR"
},
"refundHistory": [
{
"refundNo": "DOKU-REFUND-00123",
"refundStatus": "00",
"transactionDate": "2024-01-15T11:00:00+07:00",
"reason": "Customer returned 1x Widget Pro",
"refundAmount": {
"value": "500000.00",
"currency": "IDR"
}
}
]
}Retrieve a paginated list of transactions for a sub-account within a date range.
Use this for reconciliation, generating statements, and compliance reporting.
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Sub-account number
1234567890Start date in ISO 8601 format
2024-01-01T00:00:00+07:00End date in ISO 8601 format
2024-01-31T23:59:59+07:00Items per page
20Page number (starts from 0). Use 0 for the first page.
0History retrieved
Response status code. 2xxxxxx indicates success
2001200Human-readable status message
Request has been processed successfullyBad Request
Unauthorized
POST /sub-account/v2.0/transaction-history-list HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 143
{
"accountNo": "1234567890",
"fromDateTime": "2024-01-01T00:00:00+07:00",
"toDateTime": "2024-01-31T23:59:59+07:00",
"pageSize": "20",
"pageNumber": "0"
}{
"responseCode": "2001200",
"responseMessage": "Request has been processed successfully",
"detailData": [
{
"mutationType": "DEBIT",
"transactionType": "PAYOUT",
"amount": 11000,
"currency": "IDR",
"status": "SUCCESS",
"dateTime": "2026-06-19T17:03:32+07:00",
"remark": "Transfer to Bank Transfer Bank to CIMB",
"partnerReferenceNo": "TRF-BANK-013",
"referenceNo": "85da590e22f746869421f12015daeae2",
"channel": "BI_FAST"
}
]
}Process a debit transaction on a sub-account.
A webhook notification is sent to your callback URL when the transaction status updates (see Webhook: Debit below).
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Unique transaction identifier. Must be unique per request
PUR-20240115-001Sub-account number to debit
1234567890Transaction type for debit. Only PURCHASE is supported.
PURCHASEPossible values: Transaction description
Purchase of 3x Widget ProDebit processed
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulYour reference number, echoed back from the request
PUR-20240115-001DOKU-generated reference number for this transaction
DOKU-REF-00789Transaction type
PURCHASESource account number
1234567890Transaction description, echoed back from the request
Purchase of 3x Widget Pro00 = Success, 03 = Pending, 04 = Refunded, 06 = Failed
00Human-readable description of latestTransactionStatus
SuccessTimestamp when the transaction was processed, ISO 8601
2024-01-15T10:40:00+07:00Bad Request
Unauthorized
Duplicate partnerReferenceNo
POST /sub-account/v2.0/debit HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 187
{
"partnerReferenceNo": "PUR-20240115-001",
"fromAccount": "1234567890",
"transactionType": "PURCHASE",
"amount": {
"value": "500000.00",
"currency": "IDR"
},
"description": "Purchase of 3x Widget Pro"
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"partnerReferenceNo": "PUR-20240115-001",
"referenceNo": "DOKU-REF-00789",
"transactionType": "PURCHASE",
"fromAccount": "1234567890",
"amount": {
"value": "500000.00",
"currency": "IDR"
},
"description": "Purchase of 3x Widget Pro",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"transactionDate": "2024-01-15T10:40:00+07:00"
}Process a full or partial cancellation for a previous debit transaction.
References the original debit by originalPartnerReferenceNo. The cancellation amount can be equal to or less than the original debit amount.
A webhook notification is sent to your callback URL when the debit cancellation is processed (see Webhook: Debit Cancel below).
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Unique identifier for this debit cancel request
REF-20240115-001partnerReferenceNo from the original debit
PUR-20240115-001referenceNo from the original debit
DOKU-REF-00789Use REFUND_PURCHASE for cancelling a debit transaction.
REFUND_PURCHASEReason for the debit cancellation
Customer returned 1x Widget ProDebit cancellation processed
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulYour reference number, echoed back from the request
REF-20240115-001Your reference number from the original transaction
PUR-20240115-001DOKU reference number from the original transaction
DOKU-REF-00789Transaction type
REFUND_PURCHASEDOKU-assigned debit cancel number
DOKU-REFUND-00123Reason supplied on the request, echoed back
Customer returned 1x Widget Pro00 = Success, 03 = Pending, 04 = Refunded, 06 = Failed
00Human-readable description of latestTransactionStatus
SuccessTimestamp when the transaction was processed, ISO 8601
2024-01-15T11:00:00+07:00Bad Request
Unauthorized
Original transaction not found
POST /sub-account/v2.0/debit/cancel HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 261
{
"partnerReferenceNo": "REF-20240115-001",
"originalPartnerReferenceNo": "PUR-20240115-001",
"originalReferenceNo": "DOKU-REF-00789",
"transactionType": "REFUND_PURCHASE",
"refundAmount": {
"value": "500000.00",
"currency": "IDR"
},
"reason": "Customer returned 1x Widget Pro"
}{
"responseCode": "2000000",
"responseMessage": "Successful",
"partnerReferenceNo": "REF-20240115-001",
"originalPartnerReferenceNo": "PUR-20240115-001",
"originalReferenceNo": "DOKU-REF-00789",
"transactionType": "REFUND_PURCHASE",
"refundNo": "DOKU-REFUND-00123",
"refundAmount": {
"value": "500000.00",
"currency": "IDR"
},
"reason": "Customer returned 1x Widget Pro",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"transactionDate": "2024-01-15T11:00:00+07:00"
}Reverse a point top-up in full. The original top-up is marked as cancelled and the points are removed from the destination sub-account.
Only point top-ups (type: DOKU_NON_FIAT) can be voided. To reverse a point purchase, use Debit Cancel instead.
A void does not create new transaction history rows — the original TOPUP rows change status from SUCCESS to VOID on both the destination account and DOKU_SYSTEM_POINT, and remain in history as an audit trail. VOID rows are excluded from balance inquiries.
Partial voids are not supported: voidAmount.value must equal the original top-up amount exactly. Voids are not idempotent — voiding an already-voided top-up returns 4034415.
Errors
4004402
400
Invalid Mandatory Field voidAmount
voidAmount missing from the request
4034415
403
Transaction is already voided
The top-up has already been voided. Voids are not idempotent — a repeat returns this error rather than succeeding again
4034415
403
Void amount does not match original transaction amount
voidAmount.value differs from the original top-up amount. Partial voids are not supported
4034415 covers both 403 cases — branch on responseMessage, not on the code alone.
B2B Token obtained from Get B2B Token API
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Request signature generated using HMAC_SHA512(clientSecret, stringToSign). The stringToSign is constructed from request components to ensure integrity and prevent tampering.
a1b2c3d4e5f6...Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Unique identifier for this void request
VOID-20260904-001partnerReferenceNo of the top-up being voided
TOPUP-20260904-001referenceNo of the top-up being voided
f56bc695ded84aeea603d82dca0117b2Transaction type
VOID_TOPUPPossible values: Reason for the void. Accepted but not returned in the response
Top-up issued to the wrong agentVoid processed
Response status code. 2xxxxxx indicates success
2004400Human-readable status message
Request has been processed successfullyYour reference number, echoed back from the request
VOID-20260904-001Your reference number from the original transaction
TOPUP-20260904-001DOKU reference of the original top-up. Voiding does not mint a new reference
f56bc695ded84aeea603d82dca0117b2Transaction type
VOID_TOPUP05 = Canceled. Specific to this endpoint; other endpoints return 00, 03, 04 or 06
05Human-readable description of latestTransactionStatus
CanceledISO 8601 datetime, with microsecond precision
2026-09-04T09:08:10.012769+07:00Bad Request — a mandatory field is missing or malformed
Unauthorized
Forbidden. 4034415 covers both cases below — branch on responseMessage, not on the code alone.
Original transaction not found
POST /sub-account/v2.0/topup/void HTTP/1.1
Host: api-sandbox.doku.com
Authorization: Bearer YOUR_SECRET_TOKEN
X-PARTNER-ID: BRN-0001-1712345678901
X-TIMESTAMP: 2026-01-15T10:30:00+07:00
X-SIGNATURE: a1b2c3d4e5f6...
X-EXTERNAL-ID: 20260115001
Content-Type: application/json
Accept: */*
Content-Length: 276
{
"partnerReferenceNo": "VOID-20260904-001",
"originalPartnerReferenceNo": "TOPUP-20260904-001",
"originalReferenceNo": "f56bc695ded84aeea603d82dca0117b2",
"transactionType": "VOID_TOPUP",
"voidAmount": {
"value": "1000.00",
"currency": "POINT"
},
"reason": "Top-up issued to the wrong agent"
}{
"responseCode": "2004400",
"responseMessage": "Request has been processed successfully",
"partnerReferenceNo": "VOID-20260904-001",
"originalPartnerReferenceNo": "TOPUP-20260904-001",
"referenceNo": "f56bc695ded84aeea603d82dca0117b2",
"transactionType": "VOID_TOPUP",
"voidAmount": {
"value": "1000.00",
"currency": "POINT"
},
"latestTransactionStatus": "05",
"transactionStatusDesc": "Canceled",
"transactionDate": "2026-09-04T09:08:10.012769+07:00"
}This is a callback to your server, not a DOKU endpoint. DOKU posts to exactly the URL you registered at merchant setup — any host, any path, maximum 64 characters.
Webhook sent by DOKU when a BRI VA top-up payment is successful.
This is the cash VA top-up only. A point top-up (type: DOKU_NON_FIAT) does not
arrive here — it is delivered as a transfer notification, with transactionType: TOPUP and
currency: POINT. See Webhook: Transfer Payment.
Every sub-account is auto-assigned a static BRI VA (prefix 1392495 + DOKU_MERCHANT_IDR account number). When a payment is made to this VA, funds are credited to the sub-account's DOKU_MERCHANT_IDR balance in real-time.
Your system must respond with responseCode 2000000 to acknowledge receipt. Anything else is retried at roughly +30 minutes, +6 hours and +12 hours.
Key difference from Checkout/Direct API payments:
- BRI VA top-up → credited to
DOKU_MERCHANT_IDRimmediately (real-time) - Checkout/Direct API → credited to
DOKU_MERCHANT_PENDING_IDR, moves toDOKU_MERCHANT_IDRafter settlement
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001DOKU-generated reference number for this top-up transaction
45af25e8c4dd5c1634e967a2ebfff3a4043e7fd6Partner reference number for this transaction
3f97a11c4476420897f2224de1ccea73Transaction type. Always TOPUP for BRI VA top-up callbacks.
TOPUPThe DOKU_MERCHANT_IDR account number that received the top-up funds
2052010241Description of the transaction
topup accountTransaction status: 00 = Success
00Human-readable status description
SuccessPartner service identifier
77777Customer number portion of the VA number
0000000000001Transaction datetime in ISO 8601 format
2019-07-03T12:08:56+07:00Full BRI VA number that was paid (prefix 1392495 + DOKU_MERCHANT_IDR account number)
777770000000000001Name registered to the virtual account (sub-account holder name)
Toru YamashitaBank transaction ID from BRI
23219829713Payment request identifier
12839218738127830Notification acknowledged
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulPayload
{
"referenceNo": "45af25e8c4dd5c1634e967a2ebfff3a4043e7fd6",
"partnerReferenceNo": "3f97a11c4476420897f2224de1ccea73",
"transactionType": "TOPUP",
"toAccount": 2052010241,
"amount": {
"value": "1000.00",
"currency": "IDR"
},
"description": "topup account",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"partnerServiceId": "77777",
"customerNo": "0000000000001",
"trxDateTime": "2019-07-03T12:08:56+07:00",
"virtualAccountNo": "777770000000000001",
"virtualAccountName": "Toru Yamashita",
"trxId": "23219829713",
"paymentRequestId": "12839218738127830",
"additionalInfo": {
"channel": "VIRTUAL_ACCOUNT_BRI",
"serviceCode": "38"
}
}This is a callback to your server, not a DOKU endpoint. The path shown (
/sub-account/v2.0/register/notification) names the event; it is not a path your server has to expose. DOKU posts to exactly the URL you registered — any host and path, maximum 64 characters.
Webhook sent by DOKU when a sub-account registration is complete.
DOKU sends this notification to your registered callback URL. Your system must respond with a responseCode and responseMessage to acknowledge receipt.
Best practices:
- Respond quickly — return acknowledgment immediately, then process asynchronously
- Be idempotent — you may receive the same notification more than once
- Verify the
X-EXTERNAL-IDsignature to confirm authenticity
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Your merchant reference number
REG-20240115-001Parent profile code
PROF-PARENT-001New sub-account's profile code
PROF-00123Assigned referral code
REF-AUTO-001Sub-account type
DEFAULTEmail address
vendor@example.comAccount holder name
Toko MakmurRegistration status
ACTIVEAccount level in hierarchy
2Phone number of the account holder
081234567890Notification acknowledged
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulPayload
{
"partnerReferenceNo": "REG-20240115-001",
"parentProfileCode": "PROF-PARENT-001",
"profileCode": "PROF-00123",
"referralCode": "REF-AUTO-001",
"type": "DEFAULT",
"email": "vendor@example.com",
"name": "Toko Makmur",
"status": "ACTIVE",
"level": "2",
"phoneNo": "081234567890",
"accounts": [
{
"type": "DOKU_MERCHANT_IDR",
"currency": "IDR",
"accountNo": "1234567890"
}
]
}This is a callback to your server, not a DOKU endpoint. The path shown (
/sub-account/v2.0/transfer/notification) names the event; it is not a path your server has to expose. DOKU posts to exactly the URL you registered — any host and path, maximum 64 characters.
Webhook sent by DOKU when a fund transfer status updates. This covers every transfer type, including:
- Bank payout (
type: BANK_ACCOUNT) - Internal transfer between sub-accounts (
type: DOKU_SUB_ACCOUNT) - Point top-up (
type: DOKU_NON_FIAT) — arrives here withtransactionType: TOPUPandcurrency: POINT - Point P2P —
transactionType: TRANSFER_P2Pwithcurrency: POINT
Note the timestamp field is trxDateTime, not transactionDate as on the synchronous API responses. X-TIMESTAMP in the header is UTC, while trxDateTime carries a +07:00 offset.
Delivery is not instant (~75 seconds observed) and failed deliveries are retried at roughly +30 minutes, +6 hours and +12 hours. Your system must respond 200 with a responseCode and responseMessage to acknowledge receipt — see Notifications in the introduction for URL requirements, including the 64-character limit.
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001DOKU reference number
DOKU-REF-00456Your merchant reference number
TRF-20240115-002Transaction type, e.g. TOPUP, TRANSFER_P2P, PAYOUT
TOPUP00 = Success, 03 = Pending, 06 = Failed
00Status description
SuccessSource account. For a point top-up this is the DOKU_SYSTEM_POINT account
1234567890Destination account
2020144370The remark sent on the transfer inquiry
Point topupTransaction timestamp. Note the field name — trxDateTime, not transactionDate
2026-09-04T10:28:44+07:00Notification acknowledged
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulPayload
{
"referenceNo": "DOKU-REF-00456",
"partnerReferenceNo": "TRF-20240115-002",
"transactionType": "PAYOUT",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success",
"fromAccount": "1234567890",
"amount": {
"value": "500000.00",
"currency": "IDR"
},
"trxDateTime": "2026-01-15T11:00:00+07:00"
}This is a callback to your server, not a DOKU endpoint. The path shown (
/sub-account/v2.0/debit/notification) names the event; it is not a path your server has to expose. DOKU posts to exactly the URL you registered — any host and path, maximum 64 characters.
Webhook sent by DOKU when a debit transaction status updates.
Your system must respond with a responseCode and responseMessage to acknowledge receipt.
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001DOKU reference number
DOKU-REF-00789Your merchant reference number
PUR-20240115-001Merchant-defined transaction category matching the original request
PURCHASEDebited account
1234567890Destination account
0000000001Transaction description
Purchase of 3x Widget Pro00 = Success, 03 = Pending, 06 = Failed
00Status description
SuccessNotification acknowledged
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulPayload
{
"referenceNo": "DOKU-REF-00789",
"partnerReferenceNo": "PUR-20240115-001",
"transactionType": "PURCHASE",
"fromAccount": "1234567890",
"toAccount": "0000000001",
"amount": {
"value": "150000.00",
"currency": "IDR"
},
"description": "Purchase of 3x Widget Pro",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success"
}This is a callback to your server, not a DOKU endpoint. The path shown (
/sub-account/v2.0/debit/cancel/notification) names the event; it is not a path your server has to expose. DOKU posts to exactly the URL you registered — any host and path, maximum 64 characters.
Webhook sent by DOKU when a debit cancellation is processed.
Your system must respond with a responseCode and responseMessage to acknowledge receipt.
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001Your debit cancel reference number
REF-20240115-001Original DOKU reference
DOKU-REF-00789Original merchant reference
PUR-20240115-001DOKU-assigned debit cancel number
DOKU-REFUND-00123Transaction type for debit cancellation
REFUND_PURCHASEDebit cancel reason
Customer returned 1x Widget ProDebit cancel timestamp
2024-01-15T11:00:00+07:0000 = Success, 03 = Pending, 06 = Failed
00Status description
SuccessNotification acknowledged
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulPayload
{
"partnerReferenceNo": "REF-20240115-001",
"originalReferenceNo": "DOKU-REF-00789",
"originalPartnerReferenceNo": "PUR-20240115-001",
"refundNo": "DOKU-REFUND-00123",
"transactionType": "PURCHASE",
"reason": "Customer returned 1x Widget Pro",
"refundAmount": {
"value": "50000.00",
"currency": "IDR"
},
"refundTime": "2024-01-15T11:00:00+07:00",
"latestTransactionStatus": "00",
"transactionStatusDesc": "Success"
}This is a callback to your server, not a DOKU endpoint. The path shown (
/sub-account/v2.0/topup/void/notification) names the event; it is not a path your server has to expose. DOKU posts to exactly the URL you registered — any host and path, maximum 64 characters.
Sent to your registered notification URL after a point top-up is voided. Delivered to the same endpoint as other notifications.
The payload is smaller than the top-up notification — it omits referenceNo, transactionType, toAccount and remarks. trxDateTime carries the timestamp of the original top-up, not of the void, and the amount is in amount (not voidAmount as in the API request).
Delivery is not instant (~75s observed) and failed deliveries are retried at roughly +30 minutes, +6 hours and +12 hours. Return 200 with the acknowledgement or DOKU keeps retrying.
Your Partner ID (DOKU's Client ID)
BRN-0001-1712345678901Client's current local time in ISO 8601 format, with timezone offset
2026-01-15T10:30:00+07:00Numeric string used as a request reference. Must be unique within the same day (resets daily). Used by DOKU to detect and reject duplicate requests.
20260115001The partnerReferenceNo of the void request, not of the original top-up
VOID-P4-1788418482099The sub-account the points are taken back from
202014437005 = Canceled
05Human-readable description of latestTransactionStatus
CanceledTimestamp of the original top-up, not of the void
2026-09-03T13:54:41+07:00Acknowledgement
Response status code. 2xxxxxx indicates success
2000000Human-readable status message
SuccessfulPayload
{
"partnerReferenceNo": "VOID-P4-1788418482099",
"fromAccount": "2020144370",
"amount": {
"value": "100000.00",
"currency": "POINT"
},
"latestTransactionStatus": "05",
"transactionStatusDesc": "Canceled",
"trxDateTime": "2026-09-03T13:54:41+07:00"
}Last updated