DOKU Wallet
Integration Steps
Overview of integration process with DOKU Wallet SNAP.
1. Token
Before partners can access SNAP API DOKU, a partner must request a B2B / B2B2C token. Token B2B / B2B2C session expired 900s (access token will continue to be used as long as there is activity request API from a partners to DOKU), but when partners request access token B2B / B2B2C more than one element before time limit expired, the latest access token B2B / B2B2C will be processed.
a. Token B2B
Token B2B used all SNAP API DOKU.
Credential partner from DOKU
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Algorithm symmetric signature SHA256withRSA(PrivateKey, StringToSign) SHA256withRSA is used to generate the signature with your Private Key. Generate StringToSign : StringToSign = client_ID+"|"+X-TIMESTAMP
client_credentialsOK
OK
b. Token B2B2C
Token B2B2C is used for all SNAP API DOKU that involve customers for transaction activity.
Credential partner from DOKU
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Algorithm symmetric signature SHA256withRSA(PrivateKey, StringToSign) SHA256withRSA is used to generate the signature with your Private Key. Generate StringToSign : StringToSign = client_ID+"|"+X-TIMESTAMP
authorization_codecfb5de1a-6a40-40e0-8549-0634bcaed8edOK
OK
2. Account Creation
At this stage is the process for registering a new account, where after a successful registration process the customer will get a DOKU ID that is unique among customers to one another.
POST snap-adapter/b2b/v1.0/registration-account-creation
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
f1a69bce-41bc-4abd-8c5c-01910574e404SNAPaccount1123001081212340010[email protected]https://doku.comOK
OK
3. Verify OTP
Partners use API Verify OTP when user input OTP on partner side, this activity is required when we need to validate the account, example on flow journey Account Creation and Account Unbinding.
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Activity ID partners from request AccountCreationActivity ID DOKU from respond AccountCreationOTP that user inputOK
OK
4. Account Binding
Account Binding is flow to bind DOKU Wallet accounts to partner for get authCode (B2BB2C / Authorization-Customer for payment purposes)
POST snap-adapter/b2b/v1.0/registration-account-binding
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Activity ID from partnersPartner URL when user finish bindingOK
OK
5. Account Inquiry
POST snap-adapter/b2b/v1.0/registration-account-inquiry
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Identifier activity ID from partnersOK
OK
6. Account Unbinding
This is the process when customers want to unbinding their DOKU account from merchants. To complete the unbinding account process OTP must send to API Verify OTP.
POST snap-adapter/b2b/v1.0/registration-account-unbinding
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Identifier activity ID from partnersIdentifier provided from Account BindingCredential client ID from DOKUOK
OK
7. Balance Inquiry
With this API, partners can check for customer balance that has been verified by DOKU, so that partners can equate customer data, between partners and DOKU.
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
Activity ID from partnersOK
OK
8. Transfer Bank Account Inquiry
This API allows partners to get BANK beneficiary information, so customers can see and confirm the transfer activity
POST snap-adapter/b2b2c/v1.0/emoney/bank-account-inquiry
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
partnerReferenceNocustomerNumberbeneficiaryAccountNumberOK
OK
9. Transfer Bank Account Payment
This API allows partners to trigger transfer balance from account balance to BANK Account
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
partnerReferenceNocustomerNumberaccountTypebeneficiaryAccountNumberbeneficiaryBankCodeOK
OK
10. Account Top Up
This API allows partners to trigger transfer balance from their corporate account balance to DOKU customer Account.
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
partnerReferenceNocustomerNumbersessionIdnotesOK
OK
11. Query Top Up
This API allows partners to check status top up.
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
originalPartnerReferenceNooriginalReferenceNooriginalExternalIdserviceCodeOK
OK
12. Purchase Web
Partners can provide an online payment facility using PIN authentication that can facilitate customers in making the transaction at any merchant that has been integrated. DOKU will provide a webview payment page to input the PIN and proceed with the payment
POST snap-adapter/b2b2c/v1.0/debit/payment-host-to-host
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
Transaction ID from partnersDefault “DOKU”OK
OK
13. Query Purchase
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
Transaction ID from partnersUnique service API “17”Transaction dateOK
OK
14. Cancel Purchase
Partners can cancel the transaction or reverse immediately after successful transaction processing in the DOKU system, it can be used in case of time-out or other problems that occur on the merchant side
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
Original Transaction ID from partnersReason cancelationOK
OK
15. Refund Purchase
Partners can request a refund when the transaction has already settled.
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
Original Transaction ID from partnersReason cancelationTransaction ID on service consumer system, when for refund payment.OK
OK
16. Transaction History List
This API allows partners to get history from an account with 1 month range time and the oldest transaction is 1 year behind.
POST snap-adapter/b2b2c/v1.0/transaction-history-list
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
Activity ID from partnersStarting time range ISO-8601Ending time range ISO-8601Maximum number of transaction returned in one pagination Default 10Current page number Default 0OK
OK
17. Transaction History Detail
This API allows partners to get transaction details from an account.
POST snap-adapter/b2b2c/v1.0/transaction-history-detail
Client's current local time in yyyyMMddTHH:mm:ss.SSST ZD format
Credential client ID from DOKU
Reference number that should be unique in the same day
SHA-512 HMAC is used to generate the signature with your Client Secret. Generate stringToSign : HTTPMethod + ”:“+ EndpointUrl +":"+ B2BAccessToken + ":“+ Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + X-TimeStamp
Represents access_token of a request, string starts with keyword “Bearer ” followed by Token B2B
Represents access_token of a request belong customer; string starts with keyword “Bearer ” followed by Token B2B2C
Transaction ID from partnersOK
OK
Last updated
Was this helpful?