Registration - Account Binding API E-Wallet (Direct Debit) SNAP
About Registration - Account Binding API E-Wallet (Direct Debit) SNAP
This API uses to initiates the Customer's account binding process to the E-Wallet payment method based on SNAP standardization.
Registration - Account Binding API E-Wallet (Direct Debit) SNAP
Visit the Account Binding - API E-Wallet (Direct Debit) SNAP page to know the account binding process flow.
This API used by the Merchant to initiate user account own by the Customer linking process that will be used on the transaction process with NICEPAY system.
Service Code | 07 |
|---|---|
API Endpoint | /nicepay/api/v1.0/registration-account-binding |
Method | POST |
Request Header Parameter for Registration - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
Content-Type | String | Variable | Mandatory | Content type, value always application/json |
Authorization | String | Variable | Mandatory | Bearer “accessToken” |
X-TIMESTAMP | String | Variable | Mandatory | Transaction date time, in format YYYY-MMDDTHH:mm:ss+07:00. Time must be in GMT+7 (Jakarta time) |
X-SIGNATURE | String | Variable | Mandatory | Signature will be generated automatically by Merchant |
X-PARTNER-ID | String | 10 | Mandatory | Unique Partner ID, Partner ID = Client ID |
X-EXTERNAL-ID | String | 40 | Mandatory | Unique messaging Reference ID generated by Merchant. Numeric String. Reference number that should be unique in every transaction |
CHANNEL-ID | String | 5 | Mandatory | Device identification on which the API services is currently being accessed by the End User (Customer) |
Request Body Parameter for Registration - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
partnerReferenceNo | String | 40 | Mandatory | Merchant transaction identifier |
merchantId | String | 10 | Mandatory | Merchant identifier that is unique per each Merchant |
additionalData | JSON Object | Variable | Mandatory | Additional Data |
userId | String | 100 | Mandatory | Customer Name |
String | 40 | Mandatory | Customer Email | |
phoneNo | String | 15 | Mandatory | Customer Phone Number |
additionalInfo | JSON Object | Variable | Mandatory | Additional information |
mitraCd | String | 4 | Mandatory | NICEPAY Mitra Code Example : AstraPay : ASTR AlloBank : ALLO |
callBackUrl | String | 255 | Mandatory | Payment result forward URL (on browser) |
Response Header Parameter for Registration - 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 Registration - Account Binding API E-Wallet (Direct Debit) SNAP
Parameter | Type | Length | Mandatory | Description |
|---|---|---|---|---|
responseCode | String | 7 | Mandatory | Refer to response code list |
responseMessage | String | 150 | Mandatory | Debug message to provide mor e information |
referenceNo | String | 40 | Mandatory | NICEPAY Transaction ID |
partnerReferenceNo | String | 40 | Mandatory | Merchant transaction identifier |
redirectUrl | String | 255 | Mandatory | Redirect URL to process binding account |
additionalInfo | JSON Object | Variable | Mandatory | Additional information |
mitraCd | String | 4 | Mandatory | NICEPAY Mitra Code |
authCode | String | 30 | Mandatory | Authentication Code for Merchant |
Sample Parameter for Registration - Account Binding API E-Wallet (Direct Debit) SNAP
Request Parameter
const config = {
isProduction: false,
privateKey: cons.privateKey,
clientSecret: cons.clientSecret,
clientId: "IONPAYTEST",
isCloudServer: false,
};
const ACCESS_TOKEN = "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJJT05QQVlURVNUIiwiaXNzIjoiTklDRVBBWSIsIm5hbWUiOiJCUklOIiwiZXhwIjoiMjAyNC0wMi0xMVQwODowOTozNVoifQ==.aIybLX36dYwfFvW7dcoenXkOe2EAwIYq84ZtPuIf3K8=";
const parameter = {
body: {
partnerReferenceNo: "2020102900000000000001",
merchantId: "IONPAYTEST",
additionalData: {
userId: "John Doe",
email: "[email protected]"
},
phoneNo: "0899345678864332",
additionalInfo: {
mitraCd: "ASTR",
callBackUrl: "https://merchant.com/ProcesscallBackUrlUrl"
}
},
headers: {
X_EXTERNAL_ID: "tXid202410142300021707638093",
CHANNEL_ID: "IONPAYTEST01",
},
};
let snap = new Snap(config);
let endPoint = `/api/v1.0/registration-account-binding`;
let response = snap
.requestSnapTransaction(parameter, endPoint, ACCESS_TOKEN, "POST");Response Parameter
{
"responseCode": "2000700",
"responseMessage": "Successful",
"referenceNo": "IONPAYTEST05202208121451526358",
"partnerReferenceNo": "2020102900000000000001",
"redirectUrl": "https://redirect.com/account-binding/644efc4f9bb145efa6cf1e396",
"additionalInfo": {
"mitraCd": "ASTR",
"authCode": "nlleyvaQcB2SOkVjtF7ceCuC16BiqCc6DRrjaKOnnfRdToW8Tr"
}
}