Credit Cards

One-shot Credit Card Bill Payment. Accepts all visa & master, diners, amex card

📘

Header Request

secret : Unique secret key (Provided by Pay2New)
outletId: Unique OutletID (Provided by Pay2New)

Request Parameters

ParametersTypeDescription
numberStringCredit Card Number
amountIntegerAmount to be transferred
request_idStringUnique Request number
product_codeIntegerUnique Operator Code
customer_nameStringCredit Card Holder Name
ipStringOnboard User IP Address
latitudeStringCurrent location latitude
longitudeStringCurrent location longitude

Sample Request

curl --location --request POST 'https://pay2new.in/apis/payout/v1/ccard' \
--header 'secret: qwertyuQWERTY12345asdf' \
--header 'outletId;**' \
--header 'Content-Type: application/json' \
--data-raw '{
    "number": "	5105105105105100",
    "amount": 10,
    "request_id": "P2N54544444545",
    "product_code": 265,
    "customer_name": "TEST TEST",
    "ip": "30.169.159.167",
    "latitude": "19.1258",
    "longitude": "74.7453"
}'
<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://pay2new.in/apis/payout/v1/ccard',
  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": "	5105105105105100",
    "amount": 10,
    "request_id": "P2N54544444545",
    "product_code": 265,
    "customer_name": "TEST TEST",
    "ip": "30.169.159.167",
    "latitude": "19.1258",
    "longitude": "74.7453"
}',
  CURLOPT_HTTPHEADER => array(
    'secret: qwertyuQWERTY12345asdf',
    'Content-Type: application/json',
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

Response Parameters

ParametersTypeDescription
statusIntegerPay2new status code
messageStringMessage from API
order_idStringTransaction Id ( If transaction otherwise it is null )
txn_valueStringTransaction amount
balanceStringRemaining Balance
request_idStringUniqued Request number
beneArrayResponse Data (If Present)
bank_referenceStringBank reference number

Sample Response

{
    "status": 1,
    "message": "Transaction Successful",
    "order_id": "P2N5452534158DFOLASDF",
    "txn_value": "10.00",
    "balance": "10583.26",
    "request_id": "P2N54544444545",
    "bene": {
        "account": "123456789123456",
        "name": "",
        "cardNetwork": "VISA",
        "bankName": "JS COMMERCIAL BANK FOR FOREIGN TRADE OF VIETNAM"
    },
    "bank_reference": "1234567890123"
}

🚧

Note:

  • Latitude and Longitude must be represented in degrees with 4 digits after decimal.
Language
Click Try It! to start a request and see the response here!