post https://pay2new.in/apis/offer/v1/billFetch/
Header Request
secret : Unique secret key (Provided by Pay2New)
Request Parameters
Parameters | Type | Mandatory (M) , Optional(O) | Description |
---|---|---|---|
number | String | M | Billing number |
product_code | String | M | Unique Operator Code |
request_id | String | M | Your Unique Transaction Id |
optional1 | String | O | Depends on Operator |
optional2 | String | O | Depends on Operator |
optional3 | String | O | Depends on Operator |
optional4 | String | O | Depends on Operator |
request_id | String | M | Unique Request Number |
customer_number | String | M | Customer mobile number |
pincode | String | M | Customer pin code |
latitude | String | M | Current location latitude |
longitude | String | M | Current location longitude |
ip | String | M | Onboard User Ip address |
outletId | Integer | M | Provide by Pay2New |
Sample Request
curl --location 'https://pay2new.in/apis/offer/v1/billFetch' \
--header 'secret: qwertyuQWERTY12345asdf' \
--header 'Content-Type: application/json' \
--data '{
"number": "123456789321",
"product_code": "400",
"request_id": "P2N54544444545",
"optional1": "2640",
"optional2": "",
"optional3": "",
"optional4": "",
"customer_number": "9876543210",
"pincode": "414002",
"latitude": "19.1258",
"longitude": "74.7453",
"ip": "30.169.159.167",
"outletId": 2
}'
<?php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => 'https://pay2new.in/apis/offer/v1/billFetch',
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => '',
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_POSTFIELDS =>'{
"number": "123456789321",
"product_code": "400",
"request_id": "P2N54544444545",
"optional1": "2640",
"optional2": "",
"optional3": "",
"optional4": "",
"customer_number": "9876543210",
"pincode": "414002",
"latitude": "19.1258",
"longitude": "74.7453",
"ip": "30.169.159.167",
"outletId": 2
}',
CURLOPT_HTTPHEADER => array(
'secret: qwertyuQWERTY12345asdf',
'Content-Type: application/json',
),
));
$response = curl_exec($curl);
curl_close($curl);
echo $response;
Response Parameters
Parameters | Type | Description |
---|---|---|
status | Integer | Pay2New status code |
message | String | Message from API |
data | Array | Response Data (If Present) |
data.customer_name | String | Bill Holder Customer name |
data.bill_period | String | Bill Period |
data.bill_date | String | Bill date |
data.bill_due_date | String | Last date of Bill Pay |
data.bill_number | String | Bill number |
data.amount | String | Bill amount |
order_id | String | Transaction Id ( If transaction otherwise it is null ) |
Sample Response
{
"status": 1,
"message": "Transaction Successful",
"data": {
"customer_name": "Test",
"bill_period": "MONTHLY",
"bill_date": "15/04/2023",
"bill_due_date": "06/05/2023",
"bill_number": "123456789",
"amount": "1350.00"
},
"order_id": "P2N5452534158DFOLASDF"
}