cimb-direct-debit-register-card
Here is the flow for registering card:
Direct API - CIMB Direct Debit Register Card Sequence Diagram

To register the card, you will need to hit this API through your Backend:
API Request
Type | Value |
---|---|
HTTP Method | POST |
API endpoint (Sandbox) | https://api-sandbox.doku.com/cimb-direct-debit/v1/token |
API endpoint (Production) | https://api.doku.com/cimb-direct-debit/v1/token |
Here is the sample of request header to register the debit card:
Client-Id: MCH-0001-10791114622547
Request-Id: 672118bb-9963-43ce-93b2-26d4fd0732a3
Request-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=vl9DBTX5KhEiXmnpOD0TSm8PYQknuHPdyHSTSc3W6Ps=
Request Header Explanation
Parameter | Description |
---|---|
Client-Id | Client ID retrieved from DOKU Back Office |
Request-Id | Unique random string (max 128 characters) generated from merchant side to protect duplicate request |
Request-Timestamp | Timestamp request on UTC time in ISO8601 UTC+0 format. It means to proceed transaction on UTC+7 (WIB), merchant need to subtract time with 7. Ex: to proceed transaction on September 22th 2020 at 08:51:00 WIB, the timestamp should be 2020-09-22T01:51:00Z |
Signature | Security parameter that needs to be generated on merchant Backend and placed to the header request to ensure that the request is coming from valid merchant. Please refer to this section to generate the signature |
Here is the sample of request body to register the debit card:
{
"customer": {
"id": "DOKUxCIMB_UAT_01",
"name": "TEST",
"email": "wtd@mail.com",
"phone": "6281394130621",
"id_card": "18291829918778",
"country": "Indonesia",
"address": "Jl. Menara Mulia",
"date_of_birth": "01-12-2000",
"additional_info": "None"
},
"debit_card": {
"account_email": "anton@example.com",
"account_mobile_phone":"6281394130621",
"success_registration_url":"https://jokul.doku.com/bo/login",
"failed_registration_url":"https://jokul.doku.com/bo/logixxx"
}
}
Request Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
customer.id | string | Mandatory | Unique customer identifier generated by merchant. Required to generate payment token. Allowed chars: alphabetic, numeric, special chars Max Length: 128 |
customer.name | string | Optional | Customer name Allowed chars: alphabetic Max Length: 64 |
customer.email | string | Optional | Customer email Allowed chars: alphabetic, numeric, special chars Max Length: 64 |
customer.phone | string | Optional | Customer phone number. Format: {calling_code}{phone_number} . Example: 6281122334455Allowed chars: numeric Max Length: 32 |
customer.address | string | Optional | Customer address Allowed chars: alphabetic, numeric, special chars Max Length: 256 |
customer.country | string | Optional | 2 alphabetic country code ISO 3166-1 Allowed chars: alphabetic Min-max Length: 3 |
customer.id_card | string | Optional | Customer Identity Card number (KTP) for our risk engine assessment Allowed chars: alphabetic, numeric, special chars Max length: 32 |
customer.date_of_birth | string | Optional | Customer date of birth for our risk engine assesment Format: dd-MM-yyyy |
customer.additional_info | string | Optional | Customer additional info Max Length: 256 |
debit_card.account_email | string | Optional | Registered email on the CIMB |
debit_card.account_mobile_phone | string | Mandatory | Registered phone number on the CIMB. Format: {calling_code}{phone_number} .Example: 6281122334455Max Length: 20 |
debit_card.success_registration_url | string | Optional | URL for direct page after success register |
debit_card.failed_registration_url | string | Optional | URL for direct page after failed register |
API Response
After hitting the above API request, DOKU will give the response.
Type | Value |
---|---|
HTTP Status | 201 |
Result | CREATED |
Here is the sample response header:
Client-Id: MCH-0001-10791114622547
Request-Id: 672118bb-9963-43ce-93b2-26d4fd0732a3
Response-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=1jap2tpgvWt83tG4J7IhEwUrwmMt71OaIk0oL0e6sPM=
Response Header Explanation
Parameter | Description |
---|---|
Client-Id | Same as the request |
Request-Id | Same as the request |
Response-Timestamp | Timestamp Response on UTC with format ISO8601 UTC+0 from DOKU |
Signature | Signature generated by DOKU based on the response body |
Here is the sample of response body:
{
"customer": {
"email": "wtd@mail.com",
"phone": "6281394130621",
"id_card": "18291829918778",
"country": "Indonesia",
"address": "Jl. Menara Mulia",
"date_of_birth": "01-12-2000",
"additional_info": "None",
"id": "DOKUxCIMB_36",
"name": "CIMB_DIRECTDEBIT08"
},
"debit_card": {
"cimb_registration_url": "https://alphaoctocash.cimbniaga.co.id/api-manager-external/alpha/direct-debit-web/register/a9e4c88c-a4ae-11ea-9682-0a1987d200002663",
"status": "PENDING",
"message": "Waiting for validated by CIMB"
}
}
Response Body Explanation
Parameter | Type | Mandatory | Description |
---|---|---|---|
customer.id | string | Mandatory | Same as the request |
customer.name | string | Optional | Same as the request |
customer.email | string | Optional | Same as the request |
customer.phone | string | Optional | Same as the request |
customer.address | string | Optional | Same as the request |
customer.country | string | Optional | Same as the request |
customer.id_card | string | Optional | Same as the request |
customer.date_of_birth | string | Optional | Same as the request |
customer.additional_info | string | Optional | Same as the request |
debit_card.cimb_registration_url | string | Mandatory | url from CIMB for input rekening number |
debit_card.status | string | Mandatory | Token status. In this state, it should be PENDING |
debit_card.message | string | Mandatory | The token message according to debit.card.status |