Access Token B2B & B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
About Access Token B2B & B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
This part contains detail informationďťż related to APIďťż access token needs with SNAPďťż standardization used to proceedďťż theďťż processďťż related to B2B and B2B2C.
Access Token B2B - Account Binding API E-Wallet (Direct Debit) SNAP
ďťżVisitďťż theďťż Account Binding - API E-Wallet (Direct Debit) SNAPďťż pageďťż to know theďťż flow how to obtain an access token during theďťż account binding processďťż.
Access Token B2B used by theďťż Merchantďťż to initiate transactionďťż processďťż with NICEPAYďťż systemďťż.
Service Code | 73 |
|---|---|
API Endpoint | /nicepay/v1.0/access-token/b2b |
Method | POST |
Description | Get Access Token B2B Specification |
ďťż
Request Header Parameter for Access Token B2B - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
Content-Type | String | Variable | Mandatory | Application/Json |
X-TIMESTAMP | String | Variable | Mandatory | yyyy-MM-ddTHH:mm:ss.SSSTZD (2022-03-21T10đ40+07:00) |
X-CLIENT-KEY | String | Variable | Mandatory | ďťżNICEPAYďťż Credential Client ID |
X-SIGNATURE | String | Variable | Mandatory | X-SIGNATURE: created using asymmetric signature SHA256withRSA algorithm (Private_Key, stringToSign) stringToSign = client ID + â|â + X-TIMESTAMP |
ďťż
Request Body Parameter for Access Token B2B - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
grantType | String | Variable | Mandatory | Grant Type Value: âclient_credentialsâ |
additionalInfo | JSON Object | Variable | Mandatory | Additional Information |
ďťż
Response Header Parameter for Access Token B2B - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
Content-Type | String | Variable | Mandatory | Content type, value always application/json |
X-TIMESTAMP | String | Variable | Mandatory | Transaction date time, in format YYYY-MMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
ďťż
Response Body Parameter for Access Token B2B - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
responseCode | String | Variable | Mandatory | Refer to response code list |
responseMessage | String | Variable | Mandatory | Debug message to provide more informationďťż |
accessToken | String | 2048 | Mandatory | Token Authorization that NICEPAYďťż used for Shopee Pay APIďťż Services |
tokenType | String | Variable | Mandatory | Token Type Value: âBearerâ |
expiresIn | String | 3 | Mandatory | Token Validate Time |
ďťż
Sample Parameter for Access Token B2B - Account Binding API E-Wallet (Direct Debit) SNAP
Request Parameter
Response Parameter
{
"responseCode": "2007300",
"responseMessage": "Successful",
"accessToken": "Xy8duZzAvv9bwDXxRxcb89tsuvk4MF4kx4lGfE4aCRVxR7XdERhbe1",
"tokenType": "Bearer",
"expiresIn": "900"
}ďťż
Access Token B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
Access Token B2B2C used by theďťż Merchantďťż to initiate theďťż Customerďťż transactionďťż processďťż using a linked account with NICEPAYďťż systemďťż.
Service Code | 74 |
|---|---|
API Endpoint | /nicepay/api/v1.0/access-token/b2b2c |
Method | POST |
Description | Get Access Token B2B2C Specification |
ďťż
Request Header Parameter for Access Token B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
Content-Type | String | Variable | Mandatory | Application/Json |
X-TIMESTAMP | String | Variable | Mandatory | yyyy-MM-ddTHH:mm:ss.SSSTZD (2022-03-21T10đ40+07:00) |
X-CLIENT-KEY | String | Variable | Mandatory | ďťżNICEPAYďťż Credential Client ID |
X-SIGNATURE | String | Variable | Mandatory | X-SIGNATURE: created using asymmetric signature SHA256withRSA algorithm (Private_Key, stringToSign) stringToSign = client ID + â|â + X-TIMESTAMP |
ďťż
Request Body Parameter for Access Token B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
grantType | String | 32 | Mandatory | Apply token request key type, can be AUTHORIZATION_CODE or REFRESH_TOKEN |
authCode | String | 256 | Conditional | The authorization code received after theďťż User provides theďťż consent. Mandatory if grantType = AUTHORIZATION_CODE |
refreshToken | String | 512 | Conditional | Refresh token to get a new accessToken where theďťż User doesn't need to provide theďťż consent again. Mandatory if grantType = REFRESH_TOKEN. Refresh Token should be less than access token validity and will be manage by theďťż PJPâs application to generate a new access_token. |
additionalInfo | JSON Object | Variable | Mandatory | Additional informationďťżďťż |
partnerReferenceNo | String | 40 | Mandatory | ďťżMerchantďťż transactionďťż identifier from NICEPAYďťż |
mitraCd | String | 4 | Mandatory | ďťżNICEPAYďťż Mitraďťż Code AstraPay : ASTR AlloBank : ALLO |
ďťż
Response Header Parameter for Access Token B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
Content-Type | String | Variable | Mandatory | Content type, value always application/json |
X-TIMESTAMP | String | Variable | Mandatory | Transaction date time, in format YYYY-MMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
ďťż
Response Body Parameter for Access Token B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
responseCode | String | 7 | Mandatory | Refer to response code list |
responseMessage | String | 40 | Mandatory | Debug message to provide more informationďťż |
accessToken | String | 50 | Mandatory | Authorization in theďťż form of a string given to theďťż user and used to access protected resources |
tokenType | String | 50 | Mandatory | Bearer Token |
accessTokenExpiryTime | String | 50 | Mandatory | Access token valid time will be 15 days format ISO8601 |
refreshToken | String | 50 | Mandatory | Random string used by theďťż user to get a new accessToken to access user data by format UUID |
refreshTokenExpiryTime | String | 50 | Mandatory | Time for theďťż refreshToken to expire |
additionalInfo | JSON Object | Variable | Mandatory | Additional informationďťżďťż |
partnerReferenceNo | String | 40 | Mandatory | ďťżMerchantďťż transactionďťż identifier from NICEPAYďťżďťż |
referenceNo | String | 40 | Mandatory | ďťżNICEPAYďťż Transaction ID |
mitraCd | String | 4 | Mandatory | ďťżNICEPAYďťż Mitraďťż Code AstraPay : ASTR Allo Bank : ALLO |
ďťż
Sample Parameter for Access Token B2B2C - Account Binding API E-Wallet (Direct Debit) SNAP
Request Parameter
curl -X POST \
'https://dev.nicepay.co.id/nicepay/v1.0/access-token/b2bc' \
-H 'Content-Type: application/json' \
-H 'X-SIGNATURE: aFHq5SNdWO5Pq2vwZk4ztd9Cu3OvblG6NezGwLX3GC2mRJorDHPeZpR3V+RXrPC8ojcyCwQy01FSipmA8YdQvz1hOth7aekXzhigYCRNS34EHYEoFGD1YMHVFRvxn2Fu8HAd6wTvPNy2X2rbUS3hWrJsfa5cHu8wKVb7zPCuxNc=' \
-H 'X-CLIENT-KEY: IONPAYTEST' \
-H 'X-TIMESTAMP: 2024-01-31T10:11:40+07:00' \
-d '{"grantType":"AUTHORIZATION_CODE","authCode":"3p8Uuq0dkDBPagBvbFIo1QodNzZaJJXXITpL9mFRsWAS","refreshToken":"3911773a-d3ac-4b4f-8a6c-406c21d6883d","additionalInfo":{"partnerReferenceNo":"202208121451526358","mitraCd":"ASTR"}}'Response Parameter
{
"grantType": "AUTHORIZATION_CODE",
"authCode": "3p8Uuq0dkDBPagBvbFIo1QodNzZaJJXXITpL9mFRsWAS",
"refreshToken": "3911773a-d3ac-4b4f-8a6c-406c21d6883d",
"additionalInfo": {
"partnerReferenceNo": "202208121451526358",
"mitraCd": "ASTR"
}
}