Request Access Token - API NICEPAY Inquiry Virtual Account SNAP
About Request Access Token - API NICEPAY Inquiry Virtual Account SNAP
This API with SNAP standards contains information uses on the Virtual Account payment method with the NICEPAY Inquiry Virtual Account (NIVA) feature for requesting a token to process the transaction.
Request Access Token - API NICEPAY Inquiry Virtual Account SNAP
Before proceeding the integration process, Merchant needs to send the base URL (Merchant Domain) to NICEPAY's Integration Team through email ([email protected]) so that Merchant can access the NIVA API.
After receiving the base URL, NICEPAY will provides the Merchant with a Public Key, so the Merchant can immediately proceed with the integration process.
Get Access Token
NICEPAY will generate an access_token for theMerchant through the API. The provided access_token will follow the Merchant's format and expires after 15 minutes.
API Endpoint | https://[merchant-domain]/api/v.1.0/access-token/b2b |
|---|---|
Method | POST |
Description | To request access token for NIVA transaction |
Content-type | application/json |
Request Access Token Header Parameter
Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | String | Mandatory | String Media Type of the Resource | application/json |
X-TIMESTAMP | String | Mandatory | NICEPAY Timezone | YYYY-MM-DDTHH:MM:SS (2024-01-22T15:00:01+07:00) |
X-CLIENT KEY | String | Mandatory | Merchant ID | IONPAYTEST |
X-SIGNATURE | String | Mandatory | NICEPAY Signature | Generated by Partner/Merchant created using asymmetric signature SHA256withRSA algorithm (Private_Key, stringToSign) stringToSign = client ID + “|” + X-TIMESTAMP |
Request Access Token Body Parameter
Parameter | Type | Length | Required | Description |
|---|---|---|---|---|
grantType | String | 8 | Mandatory | Customer Name |
additionalInfo | String | 17 | Mandatory | Goods/Item Name |
Request Access Token Response Parameter
Parameter | Type | Length | Required | Description |
|---|---|---|---|---|
responseCode | String | 5 | Mandatory | Response Code |
responseMessage | String | 100 | Mandatory | Response Message |
accessToken | String | 150 | Mandatory | Access Token |
tokenType | String | 8 | Mandatory | Type Token |
expiresIn | String | 17 | Mandatory | Session Expiry in Second |
additionalInfo | String | 17 | Mandatory | Additional Information |
Sample Parameter
{
"responseCode": "2007300",
"responseMessage": "Successful",
"accessToken": "Xy8duZzAvv9bwDXxRxcb89tsuvk4MF4kx4lGfE4aCRVxR7XdERhbe1",
"tokenType": "Bearer",
"expiresIn": "900",
"additionalInfo": {}
}