Generate Token API

Endpoint

TypeValue

HTTP Method

POST

API endpoint (Test Mode)

https://api-uat.doku.com/adv-core-api/partner/v1.0/token

API endpoint (Production)

https://api.doku.com/adv-core-api/partner/v1.0/token

Request Header

Client-Id: BRN-0001-10791114622547
Request-Id: fdb69f47-96da-499d-acec-7cdc318ab2fe
Request-Timestamp: 2020-08-11T08:45:42Z
Signature: HMACSHA256=1jap2tpgvWt83tG4J7IhEwUrwmMt71OaIk0oL0e6sPM=
ParameterDescription

client-id

Client ID (Brand ID) will be shared by DOKU Account Manager

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

Request Body

{
  "grant_type": "client_credentials",
  "valid_time": "360"
}// Some code
ParameterTypeMandatoryDescription

grant_type

string

Mandatory

value client_credentials

valid_time

string

Optional

in minutes

Response

{
    "token": "eyJhbGciOiJSUzI1NiJ9.eyJzdWIiOiJwYXlsb2FkIiwiZXhwIjoxNzA0ODY2MTkxLCJ1c2VyIjp7ImJ1c2luZXNzU2VydmljZUNsaWVudElkIjoiQlJOLTAyNDktMTY5NzUzNzM5Njc4MyJ9LCJpYXQiOjE3MDQ4NDQ1OTF9.F5HtcC4qmzTdvfSNow1mHneHKDQ4OYJl1bLghlKbEDJaIwFpIhKcbh93qEyGbTlAZsX2Akwz6idlpqd2acM4hq07jIbw5w_JbeGtB56P9bNIJJBAFEuf84ijGUOd3UPetwn0oXRnC1mvt3aCufcAqCnaR86gW8Mxs-GCA5XvkIfyc2OTnuuH5qI4ozhyYrInW3iJxs-s7CI81hPaAxfo6kC075Ub8eYcWxbtOygxthPcoSVI28OCiWGlBoBDq27DCYT3CbSlsljhEJIDMLBEkkaAMSt8RbxVi9RS2VvNwTxYLfcLiJG9UgCoKjtGCMg7M81mcD8VxkrHh5ftekbrKw"
}

Last updated