NICEPAY API
...
Advance API - SNAP
API NICEPAY Inquiry Virtual Ac...

Request Access Token - API NICEPAY Inquiry Virtual Account SNAP

8min

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   ,  needs to send  base URL ( Domain) to 's Integration Team through email (integration@nicepay.co.id) so that  can access  NIVA .

After receiving  base URL,  will provides   with a Public Key, so the  can immediately  with   .

Get Access Token

 will generate an access_token for  through  . The provided access_token will follow  '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 

Content-type

application/json



Request Access Token Header Parameter

Parameter

Type

Required

Description

Example

Content-Type

String

Mandatory

String Media Type of  Resource

application/json

X-TIMESTAMP

String

Mandatory

 Timezone

YYYY-MM-DDTHH:MM:SS

(2024-01-22T15:00:01+07:00)

X-CLIENT KEY

String

Mandatory

 ID

IONPAYTEST

X-SIGNATURE

String

Mandatory

 Signature

Generated by /

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

 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

JSON Request
JSON Response