Access Token
- Endpoint:
POST /v1.0/access-token/b2b - Tags: Indonesia SNAP/Security
Description
The Disbursement and Collection APIs will be processed with a valid Access Token added to the API request header. The Access Token is generally valid for 60 minutes. Service Code=73
Parameters
| Field | In | Type | Required | Constraints | Description |
|---|---|---|---|---|---|
Content-Type | header | string | Yes | Media type of the resource, i.e. application/json. | |
X-CLIENT-KEY | header | string | Yes | Merchant AppId,The unique identifier assigned to the merchant app by PayerMax. | |
X-TIMESTAMP | header | string | Yes | Request time, compliant with rfc3339 specification, format: yyyy-MM-dd'T'HH:mm:ss.SSSXXX The time must be within two minutes of the current time. | |
X-SIGNATURE | header | string | Yes | Represents signature of a request. |
Parameter Examples
Content-Type:""X-CLIENT-KEY:""X-TIMESTAMP:""X-SIGNATURE:""
Request Body
Required
Content-Type: application/json
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
grantType | string | Yes | Fixed value, 'client_credentials'. The client can request an access token using only its client credentials. | ||
additionalInfo | object | Yes | |||
additionalInfo.merchantNo | string | No | The unique identifier generated when the merchant signs the contract with PayerMax. Account Inquiry, Disbursement Request, and Transaction Inquiry are merchant-level APIs and require the memberNo. | ||
additionalInfo.memberId | string | No | The unique identifier generated when the merchant signs the contract with PayerMax. Balance Inquiry is a member-level API and requires the memberId |
Example
json
"{\n \"grantType\": \"client_credentials\",\n \"additionalInfo\": {\n \"merchantNo\": \"P01020128044609\"\n \"memberId\": \"20250619P01B00000075000002\"\n }\n}"Responses
200
| Field | Type | Required | Constraints | Description | Enum |
|---|---|---|---|---|---|
responseCode | string | Yes | Response code, following the SNAP standard. | ||
responseMessage | string | Yes | Response description, following the SNAP standard. | ||
expiresIn | string | Yes | Session expiry in 60 min. | ||
accessToken | string | Yes | A string representing an authorization issued to the client that used to access protected resources. | ||
tokenType | string | Yes | Fixed value ‘Bearer’,includes the access token string in the request. |
Response Example
json
{
"expiresIn": "3600",
"responseMessage": "Successful",
"accessToken": "eyJidXMiOiIxIiwidmVyIjoidjIiLCJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhcHBJZCI6IjZlNTU1MjgyMTZhZTRkNDlhYTRmN2ZkOTYyMTQ5MDY0IiwiZXhwIjoiMTc4NzY0NDQzNyIsIm1lcmNoYW50Tm8iOiJQMDEwMjAxMjgwNDQ2MDkifQ.x71VnIRzDAA7iAksryV2jSIdrxgyiXxLV1agkpsOkvs",
"tokenType": "Bearer",
"responseCode": "2007300"
}