PAYable IPG Mobile APIs
GET: https://us-central1-payable-mobile.cloudfunctions.net/ipg/sandbox/
Body: GET
?merchantKey=XXXXXXXXXX
&merchantToken=XXXXXXXXXXXXXXXXXXXX
&refererUrl=https://www.example.com
&logoUrl=https://example.com/logo.png
// (Optional) The card details will be notified with POST request
¬ificationUrl=https://example.com/request-test
// (Optional) Once the payment is done this URL will be redirected with `resultIndicator`
// which is required to check the payment status
&returnUrl=https://example.com/status-view
&amount=100.00
¤cyCode=LKR
&orderDescription=PAYable_Mobile_IPG
&customerFirstName=Aslam
&customerLastName=Anver
&customerEmail=aslam@example.lk
&customerMobilePhone=0777123456
&billingAddressStreet=Hill Street
&billingAddressCity=Dehiwala
&billingAddressCountry=LK
&billingAddressPostcodeZip=10350
&billingAddressStateProvince=Western
// Shipping details are optional
&shippingContactFirstName=Aslam
&shippingContactLastName=Anver
&shippingContactEmail=aslam@example.lk
&shippingContactMobilePhone=0777123456
&shippingAddressStreet=Hill Street
&shippingAddressCity=Dehiwala
&shippingAddressCountry=LK
&shippingAddressPostcodeZip=10350
&shippingAddressStateProvince=Western
// json - JSON response which contains the payment page URL
// html - The payment page will be loaded
&responseType=json
Response:
{
"status": "PENDING",
"uid": "969077C7-EBB5-428A-9F09-FF195560F200",
"successIndicator": "9c8d273567be4c58",
"paymentPage": "https://us-central1-payable-mobile.cloudfunctions.net/ipg/sandbox/?uid=969077C7-EBB5-428A-9F09-FF195560F200"
}
GET: https://us-central1-payable-mobile.cloudfunctions.net/ipg/sandbox/
Body: GET
?uid=969077C7-EBB5-428A-9F09-FF195560F200
Response:
GET: https://us-central1-payable-mobile.cloudfunctions.net/ipg/sandbox/status-view
Body: GET
?uid=C7ADE26D-B62C-4AC5-AE44-19F1C3139F84
&resultIndicator=5752890e6cae4be4
// Json reponse or HTML page with payment status
&responseType=json
Response:
{
"status": "SUCCESS",
"data": {
"cardHolderName": "HNB.S 776",
"statusCode": 1,
"payableCurrency": "LKR",
"payableOrderId": "oid-2b7b4069-1ef2-11ed-baa9-31321920b630",
"merchantKey": "A75BCD8EF30E529A",
"cardNumber": "511111xxxxxx1118",
"txType": "ONE_TIME_PAYMENT",
"paymentType": 1,
"payableTransactionId": "86a89f17-1ef2-11ed-bd7a-2db910859eae",
"invoiceNo": "INV1660826095925",
"custom1": "",
"payableAmount": "100.00",
"paymentScheme": "MASTERCARD",
"checkValue": "395E8610AE334B47EE0D3F31E5CC9B6C3C7AE454C3AAD5999CCAD7C9C4E8ADB56A52BA273AAC0D0AFE48EF4AD13A4B05FF7291E63C1BF30AE4DA1C3E1DA958C6",
"paymentMethod": 1,
"custom2": "",
"statusMessage": "SUCCESS"
}
}
HTML
## | Field Name | Type | Size | Description | *** |
---|---|---|---|---|---|
1 | merchantKey | String | Min=4 Max=200 |
Merchant Key of the Merchant Unique identifier for the Merchant [Given by PAYable] Format: a-zA-Z0-9 |
M |
2 | merchantToken | String | Min=4 Max=200 |
Merchant Token of the Merchant Unique identifier for the Merchant [Generated by PAYable IPG portal] Format: a-zA-Z0-9 |
M |
3 | refererUrl | String | Min=11 Max=300 |
Unique URL that used for portal account creation Format - Valid HTTPS Web URL |
M |
4 | logoUrl | String | Min=11 Max=300 |
Merchant Logo URL Format - Valid HTTPS Web URL |
M |
5 | notificationUrl | String | Max: 300 | PAYable Update Transaction API Endpoint URL Format - Valid HTTPS Web URL |
O |
6 | returnUrl | String | Min: 11 Max: 300 |
Merchant’s Return URL Format - Valid HTTPS Web URL |
M |
7 | buttonType | int | 1-10 | 1 - JavaScript pay button 2 - post method pay button Format: [1 or 2] |
O |
8 | statusViewDuration | long | 0-500 | The time period which status view screen should be on the screen. This time should be given in seconds. | O |
9 | amount | long | Final amount of the order | M | |
10 | currencyCode | String | Min:3 Max :3 |
Currency Code: LKR | M |
11 | orderDescription | String | Min:1 Max :125 |
Small Description for the Order Format: a-zA-Z0-9 and dash, dot, comma, forward slash, parenthesis, underscore, & spaces |
M |
12 | customerFirstName | String | Min=1 Max=50 | Customer’s First Name Format: a-zA-Z0-9, space, dot |
M |
13 | customerLastName | String | Min=1 Max=50 | Customer’s Last Name Format: a-zA-Z0-9, space, dot |
M |
14 | customeremail | String | Min=5 Max=100 | Customer’s Email Address Format - A valid email address format |
M |
15 | customerMobilePhone | String | Min=10 Max=15 | Customer’s Mobile Phone Number Format: Numbers (0-9) , + ,Space Ex: 07XXXXXXXX, +XXxxxxxxxxx |
M |
16 | billingAddressStreet | String | Min=1 Max=100 | Billing Details - Billing Address - Street Format: a-zA-Z0-9 and dash, dot, comma, forward slash, parenthesis, underscore, & spaces |
M |
17 | billingAddressCity | String | Min=1 Max=100 | Billing Details - Billing Address – City Format: a-zA-Z0-9 and spaces |
M |
18 | billingAddressCountry | String | Min=2 Max=3 |
Billing Details - Billing Address - Country Format: A-Z |
M |
19 | billingAddressPostcodeZip | String | Min=1 Max=10 | Billing Details - Billing Address - Postal Code Format: a-zA-Z0-9 and dash |
M |
20 | billingAddressStateProvince | String | Max=25 | Billing Details - Billing Address - Province Format: a-zA-Z0-9 and spaces |
O |
21 | shippingContactFirstName | String | Max=50 | Shipping Details - Contact Last Name Format: a-zA-Z0-9, space, dot |
O |
22 | shippingContactLastName | String | Max=50 | Shipping Details - Contact Last Name Format: a-zA-Z0-9, space, dot |
O |
23 | shippingcontactemail | String | Max=100 | Shipping Details - Contact Email Address Format: Standard email address format |
O |
24 | shippingContactMobilePhone | String | Min=10 Max=15 | Shipping Details – Contact Mobile Phone Number Format: Numbers (0-9), +, Space Ex: 07XXXXXXXX, +XXxxxxxxxxx |
O |
25 | shippingAddressStreet | String | Max=100 | Shipping Details - Shipping Address - Street Format: a-zA-Z0-9 and dash, dot, comma, forward slash, parenthesis, underscore, & spaces |
O |
26 | shippingAddressCity | String | Max=100 | Shipping Details - Shipping Address - City Format: a-zA-Z0-9 and spaces |
O |
27 | shippingAddressCountry | String | Min=2 Max=3 |
Shipping Details - Shipping Address - Country Format: A-Z |
O |
28 | shippingAddressPostcodeZip | String | Max=10 | Shipping Details - Shipping Address - Postal Code Format: a-zA-Z0-9 and dash |
O |
29 | shippingAddressStateProvince | String | Max=20 | Shipping Details - Shipping Address - Province Format: a-zA-Z0-9 and spaces |
O |
30 | responseType | String | One of these Strings: [json OR html] | M |