In order to make transactions with Dipay API products, business clients need to be authenticated first and get an Access Token. After granted access, the access token can be used to access other API. To get Access token, you need to use Asymmetric Signature. You need to input your Public Key in your Dashboard. Go to Settings >> Developer Option >> SNAP Credential tab.
Before requesting Access Token, you need to:

{
"grantType":"client_credentials"
}curl -X POST "https://partner-b2x.dipay.id/api/bi-snap/v1/access-token/b2b"
-H "Content-Type: application/json"
-H "X-TIMESTAMP: 2026-08-11T10:10:06+07:00"
-H "X-CLIENT-KEY: YOUR_CLIENT_KEY"
-H "X-SIGNATURE: YOUR_SIGNATURE"{
"responseCode":"2007300",
"responseMessage":"Successful",
"accessToken":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJqdGkiOiJiZjFmM2Q3ZS1kOTA3LTRkOWItODJlNC02Y2IxZGYxOTBlOWUiLCJjbGllbnRJZCI6IjZhZTk1N2M0LTI4NjMtNDcxMy1hY2NlLWJhMTJkZTYzNmNmYyIsIm5iZiI6MTYxMTQ2ODg1NiwiZXhwIjoxNjExNDY5NzU2LCJpYXQiOjE2MTE0Njg4NTZ9.-7HRhcyEh4y0qsG2H3DRdu0AeYv3MEJHfWRKhRBYcNU",
"tokenType":"Bearer",
"expiresIn":"900"
}
You will need to generate a pair of public and private keys for the authentication process. The public key will be shared to the provider so that the provider will be able to verify the signature for the authentication process. The public key will need to follow standards such as PKCS#1 format.
Symmetric signature use Client ID and Client Secret that is provided by Dipay.
Setting up credential needed for authentication (Input public key and obtaining Client Secret and Client ID) can be done in your Dashboard. Go to Setting >> Developer Options >> SNAP Credential tab.
In order to be able to access our API, you need to input these information in the header.
To increase security, we provide an authentication process in sending callback process thatwill use Asymmetric signature. To manage credentials for callbacks authentication, you can go to Settings >> Developer Option >> SNAP callback.
You will need to:

X-SIGNATURE = SHA256withRSA(private_key, stringToSign)
stringToSign = HTTPMethod +”:“+ EndpointUrl + ”:” + Lowercase(HexEncode(SHA-256(minify(RequestBody)))) + ":“ + “X-TIMESTAMP”