Skip to main content

cimb-direct-debit-register-card

Here is the flow for registering card:

Direct API - CIMB Direct Debit Register Card Sequence Diagram
 Direct API - CIMB Direct Debit Register Card Flow

To register the card, you will need to hit this API through your Backend:

API Request

TypeValue
HTTP MethodPOST
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
ParameterDescription
Client-IdClient ID retrieved from DOKU Back Office
Request-IdUnique random string (max 128 characters) generated from merchant side to protect duplicate request
Request-TimestampTimestamp 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
SignatureSecurity 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
ParameterTypeMandatoryDescription
customer.idstringMandatoryUnique customer identifier generated by merchant. Required to generate payment token.
Allowed chars: alphabetic, numeric, special chars
Max Length: 128
customer.namestringOptionalCustomer name
Allowed chars: alphabetic
Max Length: 64
customer.emailstringOptionalCustomer email
Allowed chars: alphabetic, numeric, special chars
Max Length: 64
customer.phonestringOptionalCustomer phone number. Format: {calling_code}{phone_number}. Example: 6281122334455
Allowed chars: numeric
Max Length: 32
customer.addressstringOptionalCustomer address
Allowed chars: alphabetic, numeric, special chars
Max Length: 256
customer.countrystringOptional2 alphabetic country code ISO 3166-1
Allowed chars: alphabetic
Min-max Length: 3
customer.id_cardstringOptionalCustomer Identity Card number (KTP) for our risk engine assessment
Allowed chars: alphabetic, numeric, special chars
Max length: 32
customer.date_of_birthstringOptionalCustomer date of birth for our risk engine assesment
Format: dd-MM-yyyy
customer.additional_infostringOptionalCustomer additional info
Max Length: 256
debit_card.account_emailstringOptionalRegistered email on the CIMB
debit_card.account_mobile_phonestringMandatoryRegistered phone number on the CIMB. Format: {calling_code}{phone_number}.Example: 6281122334455
Max Length: 20
debit_card.success_registration_urlstringOptionalURL for direct page after success register
debit_card.failed_registration_urlstringOptionalURL for direct page after failed register

API Response

After hitting the above API request, DOKU will give the response.

TypeValue
HTTP Status201
ResultCREATED

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
ParameterDescription
Client-IdSame as the request
Request-IdSame as the request
Response-TimestampTimestamp Response on UTC with format ISO8601 UTC+0 from DOKU
SignatureSignature 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
ParameterTypeMandatoryDescription
customer.idstringMandatorySame as the request
customer.namestringOptionalSame as the request
customer.emailstringOptionalSame as the request
customer.phonestringOptionalSame as the request
customer.addressstringOptionalSame as the request
customer.countrystringOptionalSame as the request
customer.id_cardstringOptionalSame as the request
customer.date_of_birthstringOptionalSame as the request
customer.additional_infostringOptionalSame as the request
debit_card.cimb_registration_urlstringMandatoryurl from CIMB for input rekening number
debit_card.statusstringMandatoryToken status. In this state, it should be PENDING
debit_card.messagestringMandatoryThe token message according to debit.card.status