Request Access Token API - SNAP
This part contains detail information related to access token API with SNAP standard uses on payment transactions, transaction status checking, and refund.
Service Code | |
API Endpoint | |
HTTP Method | POST |
Description | Request Token for Authentication |
Content-type | application/json |
Service Code | Reference API |
73 | |
12 | |
13 | |
11 | |
54 | |
55 | |
58 | |
47 | |
51 | |
78 |
Header Parameter Name | Type | Attribute | Content |
Content-Type | String | Mandatory | Application/JSON |
X-TIMESTAMP | String | Mandatory | YYYY-MM-DDTHH:MM:SS (2022-03-21T10:11:40+07:00) |
X-CLIENT KEY | String | Mandatory | NICEPAY Provided (X-CLIENT KEY = CLIENT_ID) |
X-SIGNATURE | String | Mandatory | Generated by Partner/Merchant created using asymmetric signature SHA256withRSA algorithm (Private_Key, stringToSign) stringToSign = client ID + “|” + X-TIMESTAMP |
Parameter | Type | Required | Description |
grantType | String | Mandatory | Only “client_credentials” |
additionalInfo | Object | Optional | |
BI Parameter | NICEPAY Parameter | Type | Length | Required | Description |
responseCode | responseCd | String | | Optional | |
responseMessage | responseMsg | String | | Optional | Response Message Debug message to provide more |
accessToken | | String | 2048 | Mandatory | A string representing authorization issued by Client uses to access protected resources |
tokenType | | String | | Mandatory | Token Type Value: “Bearer” |
expiresIn | | String | | Mandatory | Session expiry in seconds: 900 (15 minutes) |