Skip to main content

Generate Widget

Generate a widget for merchants, refer to the Payment and Billing section for detailed information. Token from response is the header value for Auth Bearer to allow access to Product, Billing, and Payment API’s. Timeout for token is data from timeout field request.

URL Endpoint

Generate Request

NoNameTypeMandatoryMin LengthMax LengthDescription
1 backUrlStringM1100URL
2 trxIdStringM132Transaction Id
3 merchantIdStringM1100Merchant Id
4 uniqKeyStringM132Unique Key by Merchant
5 returnUrlStringM1100URL
6 timestampStringM119YYYY-MM-DD HH:mm:ss
7 productCodesArrayM1999List Of Biller
8 terminalStringM18Terminal Id
9 terminalNameStringM120Terminal Name
10 billInfoObjectO16Detail of Bill Info
11 isNotifBooleanM15True or False
12 timeoutStringM110Timeout in second
13 merchantSignatureStringM1100SHA256

Sample Generate Request (with BillInfo)

{
"backUrl": "url",
"trxId": "12315139062851",
"username": "{{username}}",
"uniqKey": "12457365867",
"returnUrl": "url",
"timestamp": "2024-05-30 00:21:12",
"productCodes": [
"080003"
],
"terminal": "48511",
"terminalName": "Loket Bidakara",
"billInfo": {
"billNumber": "8888800393834857",
"amount": "0",
"period": "01",
"customerName": "customer name",
"customerPhone": "1234567890",
"customerEmail": "customer@gmail.com"
},
"isNotif": true,
"timeout": "30",
"merchantSignature": "9f64e59637dc36d5348dbb3cc600a1c2f07c68b513de083790abbf26f2eeee91",
}

Sample Generate Request (without BillInfo)

{
"backUrl": "https://testing.com/back",
"trxId": "12315139062851",
"username": "{{userName}}",
"uniqKey": "12457365867",
"returnUrl": "https://testing.com/return",
"timestamp": "2024-07-19 14:15:20", // YYYY-MM-DD HH:mm:ss
"productCodes": [
"080003"
],
"terminal": "Term0001",
"terminalName": "Terminal Testing",
"isNotif": true,
"timeout": "1800",
"merchantSignature": "55f70ab4b1ebaba89af351885f8a019db4713aaa498642f43f8f9ae1731430e7"
}

Generate Response

NoNameTypeMandatoryMin LengthMax LengthDescription
1 responseCodeEnumM17Status Code for Generate Widget
2 responseDescStringM1100Status Description for Generate Widget
3 redirectURLStringM1100URL to Widget App with access token included

Sample Generate Response

{
"data": {
"responseCode": "2000000",
"responseDesc": "Success",
"redirectURL": "http://localhost:3000/?token=60f7f579683f8ef6e22e4c0b755364c82a42218236c9dd5519d423590967df2a"
},
"pagination": [],
"stat_code": "APP:SUCCESS",
"stat_msg": "Success"
}