Access Token API is an API call that can be used to acquire B2B access token from Midtrans. This access token will be used for client-level verification and subsequent Transactional API such as initiating payment, refund, and cancel.
Path
/{version}/access-token/b2b
HTTP Method
POST
Version
v1.0
SNAP service code
73
Request Header
Field Name
Field Type
Mandatory
Field Description
Content-type
String
M
Media type of the resource, i.e. application/json
X-TIMESTAMP
String
M
Client’s current local time in ISO-8601 format
X-SIGNATURE
String
M
Created using asymmetric signature SHA256withRSA algorithm
X-CLIENT-KEY
String
M
Client’s client_id (given at the completion registration process)
client_credentials: The client can request an access token using only its client credentials (or other supported means of authentication) when the client is requesting access to the protected resources under its control (OAuth 2.0: RFC 6749 & 6750)