NICEPAY API
API SNAP BI

Request Access Token API - SNAP

9min

About Request Access Token - SNAP



This part contains detail information related to access token API with SNAP standard uses on payment transactions, transaction status checking, and refund.



Request Access Token API - SNAP



Get Access Token

Service Code

API Endpoint

HTTP Method

POST

Description

Request Token for Authentication

Content-type

application/json

API SNAP Service Code



Get Header

Request Access Token Header

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

Request Access Token Body

Parameter

Type

Required

Description

grantType

String

Mandatory

Only “client_credentials

additionalInfo

Object

Optional



Response Parameter

BI Parameter

NICEPAY Parameter

Type

Length

Required

Description

responseCode

responseCd

String



Optional



Error code to specify the error returned.

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)

Sample Parameter

Sample Request
Sample Response




Updated 01 Mar 2024
Did this page help you?
Yes
No