Skip to main content

Payment

Direct API - Direct Debit Allobank SNAP Payment
 Direct API - AlloBank Payment
Direct API - Direct Debit CIMB SNAP Payment
 Direct API - CIMB Payment

Direct Debit Payment

To initiate Payment, you must hit these API with your backend

API Request

TypeValueDescription
HTTP MethodPOST
API endpoint (Sandbox)https://api-sandbox.doku.com/direct-debit/[acquirer-name]/v1.0/debit/payment-host-to-hostPossible Values for [acquirer-name] : ovo, cimb, allobank, bri
API endpoint (Production)https://api.doku.com/direct-debit/[acquirer-name]/v1.0/debit/payment-host-to-hostPossible Values for [acquirer-name] : ovo, cimb, allobank, bri

Here is the sample of request header to perform Account Binding:

X-PARTNER-ID: MCH-0001-10791114622547
X-EXTERNAL-ID: 1684987418452706687
X-TIMESTAMP: 2023-01-27T15:58:59+07:00
X-IP-ADDRESS: 192.168.23.23
X-DEVICE-ID: 912f12e223624d2e94828b1681992be3
X-SIGNATURE: hMac123234nsjkdfhajnkssfhgjklsfsdfdfgdfgdfg124dfgfgh

Request Header Explanation
ParameterDescription
X-PARTNER-IDUnique ID for a partner (DOKU'S Client ID)
X-EXTERNAL-IDNumeric String. Reference number that should be unique in the same day (request-id)
X-TIMESTAMPClient's current local time in yyyy-MM- ddTHH:mm:ssTZD format
X-IP-ADDRESSIP address of the end user (customer) using IPv4 format. Notes: Mandatory for Allobank (Min:10, Max:15), Optional for rest of acquirer
X-SIGNATUREalgoritma symmetric signature HMAC_SHA512 (clientSecret, stringToSign) dengan formula stringToSign = HTTPMethod +โ€:โ€œ+ EndpointUrl +":"+ AccessToken +":โ€œ+ Lowercase(HexEncode(SHA-256(minify(RequestBody))))+ ":โ€œ + TimeStamp

Here is the sample of request body for Payment Process :

1. OVO

Request Body

{
"partnerReferenceNo": "INV_20221221_0002",
"bankCardToken": "00007100010926",
"amount": {
"value": "12345678.00",
"currency": "IDR"
},
"feeType": "SHA|1000",
"payOptionDetails": [
{
"payMethod": "CASH",
"transAmount": {
"value": "12345678.00",
"currency": "IDR"
},
"feeAmount": {
"value": "12345678.00",
"currency": "IDR"
},
}
],
"additionalInfo": {
"lineItems": [
{
"name": "masker",
"price": "5000.00",
"quantity": 1
},
{
"name": "aqua",
"price": "5000.00",
"quantity": 1
}
],
"successPaymentUrl": "https://dribbble.com/shots/14575431-Payment-method-success/attachments/6265573?mode=media",
"failedPaymentUrl": "https://dribbble.com/shots/4756331-Failed-Transaction"
}
}
BCA VA Notification Explanation
ParameterTypeMandatoryDescription
partnerReferenceNostring (64)MandatoryTransaction identifier on service consumer system, will be used as invoice number. For CIMB, Max length : 12
bankCardTokenstring (128)MandatoryCustomer's Token obtained from get B2B2C token the same with to tokenId in unbinding API
amountobjectMandatory
amount.valuestring (16)MandatoryTotal amount ends in decimal .00 if currency is IDR
amount.currencystring (3)Mandatory
feeTypestring (25)ConditionalPossible Value : OUR : Fee charged to sender (default), BEN : Fee charged to recipient, SHA
payOptionDetailsobjectMandatory
payOptionDetails.payMethodstringMandatorySource of funds. Notes : - Allobank : Balance/Point/Paylater - OVO : Cash/points
payOptionDetails.transAmountobjectMandatoryTransaction amount that will be paid using this paymentmethod If its IDR then value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00
payOptionDetails.transAmount.valueString (16)Mandatoryends in decimal .00 if currency is IDR
payOptionDetails.transAmount.currencystring (3)MandatoryIDR
payOptionDetails.feeAmountobjectOptionalFee amount that will be paid using this payment method If its IDR then value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00. Must be filled if the feeAmount data exist. Optional only to OVO
payOptionDetails.feeAmount.valuestring (16)OptionalTotal amount ends in decimal .00 if currency is IDR
payOptionDetails.feeAmount.currencystring(3)OptionalIDR
additionalInfoobjectMandatory
additionalInfo.lineItemsobjectConditionalline of items. Mandatory for Allobank
additionalInfo.lineItems.namestringConditionalName of the product item. Mandatory for Allobank
additionalInfo.lineItems.pricestring(16)ConditionalPrice of the product item. Total price and quantity must match with the amount.value, ends in decimal .00 if currency is IDR
additionalInfo.lineItems.quantitynumeric(16)ConditionalQuantity of the product item
additionalInfo.successPaymentUrlstring(255)Mandatoryredirect URL in case of binding request was a success
additionalInfo.failedPaymentUrlstring(255)Mandatoryredirect URL in case of binding request was a failure

Response Body

{
"responseCode": "20054000",
"responseMessage": "Request has been processed successfully",
"webRedirectUrl": "https://pjsp.com/universal?bizNo=REF9",
"referenceNo": "1234"
}
BCA VA Notification Explanation
ParameterTypeMandatoryDescription
responseCodestring (7)MandatoryResponse code as defined in SNAP Regulation
responseMessagestring (128)MandatoryResponse message as defined in SNAP Regulation
referenceNostring (64)Optionalaccount binding unique identifier on acquirer's side
webRedirectUrl.valuestring (2048)OptionalURL to redirect user to Acquirer's webview to let customer finish OTP

2. Allo Bank

Request Body

  {
"partnerReferenceNo": "INV_20221221_0002",
"bankCardToken": "00007100010926",
"amount": {
"value": "12345678.00",
"currency": "IDR"
},
"feeType": "SHA|1000",
"payOptionDetails": [
{
"payMethod": "CASH",
"transAmount": {
"value": "12345678.00",
"currency": "IDR"
},
"feeAmount": {
"value": "12345678.00",
"currency": "IDR"
},
}
],
"additionalInfo": {
"lineItems": [
{
"name": "masker",
"price": "5000.00",
"quantity": 1
},
{
"name": "aqua",
"price": "5000.00",
"quantity": 1
}
],
"successPaymentUrl": "https://dribbble.com/shots/14575431-Payment-method-success/attachments/6265573?mode=media",
"failedPaymentUrl": "https://dribbble.com/shots/4756331-Failed-Transaction"
}
}
BCA VA Notification Explanation
ParameterTypeMandatoryDescription
partnerReferenceNostring (64)MandatoryTransaction identifier on service consumer system, will be used as invoice number. For CIMB, Max length : 12
bankCardTokenstring (128)MandatoryCustomer's Token obtained from get B2B2C token the same with to tokenId in unbinding API
amountobjectMandatory
amount.valuestring (16)MandatoryTotal amount ends in decimal .00 if currency is IDR
amount.currencystring (3)Mandatory
feeTypestring (25)ConditionalPossible Value : OUR : Fee charged to sender (default), BEN : Fee charged to recipient, SHA
payOptionDetailsobjectMandatory
payOptionDetails.payMethodstringMandatorySource of funds. Notes : - Allobank : Balance/Point/Paylater - OVO : Cash/points
payOptionDetails.transAmountobjectMandatoryTransaction amount that will be paid using this paymentmethod If its IDR then value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00
payOptionDetails.transAmount.valueString (16)Mandatoryends in decimal .00 if currency is IDR
payOptionDetails.transAmount.currencystring (3)MandatoryIDR
payOptionDetails.feeAmountobjectOptionalFee amount that will be paid using this payment method If its IDR then value includes 2 decimal digits. e.g. IDR 10.000,- will be placed with 10000.00. Must be filled if the feeAmount data exist. Optional only to OVO
payOptionDetails.feeAmount.valuestring (16)OptionalTotal amount ends in decimal .00 if currency is IDR
payOptionDetails.feeAmount.currencystring(3)OptionalIDR
additionalInfoobjectMandatory
additionalInfo.lineItemsobjectConditionalline of items. Mandatory for Allobank
additionalInfo.lineItems.namestringConditionalName of the product item. Mandatory for Allobank
additionalInfo.lineItems.pricestring(16)ConditionalPrice of the product item. Total price and quantity must match with the amount.value, ends in decimal .00 if currency is IDR
additionalInfo.lineItems.quantitynumeric(16)ConditionalQuantity of the product item
additionalInfo.successPaymentUrlstring(255)Mandatoryredirect URL in case of binding request was a success
additionalInfo.failedPaymentUrlstring(255)Mandatoryredirect URL in case of binding request was a failure

Response Body

{
"responseCode": "20054000",
"responseMessage": "Request has been processed successfully",
"webRedirectUrl": "https://pjsp.com/universal?bizNo=REF9",
"referenceNo": "1234"
}
BCA VA Notification Explanation
ParameterTypeMandatoryDescription
responseCodestring (7)MandatoryResponse code as defined in SNAP Regulation
responseMessagestring (128)MandatoryResponse message as defined in SNAP Regulation
referenceNostring (64)Optionalaccount binding unique identifier on acquirer's side
webRedirectUrl.valuestring (2048)OptionalURL to redirect user to Acquirer's webview to let customer finish OTP

3. CIMB

Request Body

{
"partnerReferenceNo": "L20230718003",
"bankCardToken": "f8bd1847580da224476b2981adfb54ec",
"amount": {
"value": "10000.00",
"currency": "IDR"
},
"additionalInfo": {
"lineItems": [
{
"name": "masker",
"price": "5000.00",
"quantity": 1
},
{
"name": "aqua",
"price": "5000.00",
"quantity": 1
}
],
"remarks": "hadiah",
"successPaymentUrl": "https://dribbble.com/shots/14575431-Payment-method-success/attachments/6265573?mode=media",
"failedPaymentUrl": "https://dribbble.com/shots/4756331-Failed-Transaction"
}
}
Request Body Explanation
ParameterTypeMandatoryDescription
partnerReferenceNostring (12)MandatoryTransaction identifier on service consumer system, will be used as invoice number. For CIMB, Max length : 12
bankCardTokenstring (128)MandatoryCustomer's Token obtained from get B2B2C token the same with to tokenId in unbinding API
amountobjectMandatory
amount.valuestring (16)MandatoryTotal amount ends in decimal .00 if currency is IDR
amount.currencystring (3)Mandatory
additionalInfoobjectMandatory
additionalInfo.lineItemsobjectOptionalline of items. Mandatory for Allobank
additionalInfo.lineItems.namestring (32)OptionalName of the product item. Mandatory for Allobank
additionalInfo.lineItems.pricestring(16)OptionalPrice of the product item. Total price and quantity must match with the amount.value, ends in decimal .00 if currency is IDR
additionalInfo.lineItems.quantitynumeric(16)OptionalQuantity of the product item
remarksstring(40)OptionalPayment's remarks
successPaymentUrlstring(255)Mandatoryredirect URL in case of binding request was a success
failedPaymentUrlstring(255)Mandatoryredirect URL in case of binding request was a failure

Response Body

{
"responseCode": "4035413",
"responseMessage": "OTP Sent To Cardholer",
"partnerReferenceNo": "INV_20221221_0002"
}
Request Body Explanation
ParameterTypeMandatoryDescription
responseCodestring (7)MandatoryResponse code as defined in SNAP Regulation
responseMessagestring (128)MandatoryResponse message as defined in SNAP Regulation
partnerReferenceNostring (64)Optionalaccount binding unique identifier on acquirer's side