Get started

    API Endpoint

        https://smartinfinitypay.com/process/checkjson.php
                

The Smart Infinity Pay API provides programmatic access to collect payments of customers or client from UPI Apps. And get back to s2s response of every each payments.

Easy To Integrate without complex coding.

FinForyou is a payment gateway that specializes in Peer2Peer (P2P) payments. We enable you to receive payments from anyone through their UPI ID. There's no need to share bank account details or mobile numbers.

Generate Payment Link For Payment


# Here is a curl example
curl --location 'https://smartinfinitypay.com/process/checkjson.php' \
--header 'Content-Type: application/json' \
--header 'Cookie: PHPSESSID=PHP_SESSION_ID' \
--data '{
    "orderid" : "ORDER_ID",
    "userid" : "USER_IDENTIFICATION_NUMBER",
    "amount" : AMOUNT,
    "api" : "ENTER_YOUR_OWN_API_KEY",
    "type" : "P2P"/"avdpg"
}'// Here in type P2P for only UPI payments, 
and avdpg have UPI Netbanking all types of cards and 
also EMI option with advance Gateway.

PHP:

$apiUrl = 'https://smartinfinitypay.com/process/checkjson.php';
$apiKey = 'ENTER_YOUR_OWN_API_KEY';

$data = array(
    'orderid' => 'ORDER_ID',
    'userid' => 'USER_IDENTIFICATION_NUMBER',
    'amount' => 'AMOUNT',
    'api' => $apiKey,
    'type' => 'P2P' // or 'avdpg' based on your requirement
);

$jsonData = json_encode($data);

$ch = curl_init($apiUrl);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Cookie: PHPSESSID=PHP_SESSION_ID'
));

$result = curl_exec($ch);
curl_close($ch);

// Process $result variable which contains the response from the API
// Note: Make sure to handle any errors or exceptions that may occur during the request



C#:
using System;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace YourNamespace
{
    class Program
    {
        static async Task Main(string[] args)
        {
            string apiUrl = "https://smartinfinitypay.com/process/checkjson.php";
            string apiKey = "ENTER_YOUR_OWN_API_KEY";

            var data = new
            {
                orderid = "ORDER_ID",
                userid = "USER_IDENTIFICATION_NUMBER",
                amount = "AMOUNT",
                api = apiKey,
                type = "P2P" // or "avdpg" based on your requirement
            };

            var jsonData = new StringContent(System.Text.Json.JsonSerializer.Serialize(data), Encoding.UTF8, "application/json");

            using (var httpClient = new HttpClient())
            {
                httpClient.DefaultRequestHeaders.Add("Cookie", "PHPSESSID=PHP_SESSION_ID");

                var response = await httpClient.PostAsync(apiUrl, jsonData);
                string responseContent = await response.Content.ReadAsStringAsync();

                // Process responseContent variable which contains the response from the API
                // Note: Make sure to handle any errors or exceptions that may occur during the request
            }
        }
    }
}


Node.JS:
const axios = require('axios');

const apiUrl = 'https://smartinfinitypay.com/process/checkjson.php';
const apiKey = 'ENTER_YOUR_OWN_API_KEY';

const data = {
    orderid: 'ORDER_ID',
    userid: 'USER_IDENTIFICATION_NUMBER',
    amount: 'AMOUNT',
    api: apiKey,
    type: 'P2P' // or 'avdpg' based on your requirement
};

axios.post(apiUrl, data, {
    headers: {
        'Content-Type': 'application/json',
        'Cookie': 'PHPSESSID=PHP_SESSION_ID'
    }
})
    .then(response => {
        // Process response.data which contains the response from the API
        // Note: Make sure to handle any errors or exceptions that may occur during the request
    })
    .catch(error => {
        // Handle errors
    });

                

To get characters you need to make a POST call to the following url :
https://smartinfinitypay.com/process/checkjson.php



Result example :

{
"status":"success",
"message":"Transaction create successfully",
"paymenturl":"YOU WILL GET PAYMENT URL"
}//Here You will get paymenturl once you get paymenturl redirect customer to payment url once transaction created successfully.
                

QUERY PARAMETERS

Field Type Description
orderid Integer 12 Digit Of Orderid
userid Integer User Mobile Number or Primary ID.
amount Integer Amount is always in Integer not float or else type. Ex. 500
api String Place Your Own API Key which is given by system admin. for get api contact to system admin.
type String For P2P payment use = P2P parameter for advance type=avdpg is for advance gateway for easy s2s response and also you can see all payment option.

Get Order Response


For Success Payments:
Your Can Process with this symple demo of json fromate by create
dummy orderid at your end.
{
"orderid":"ORDER_ID",
"userid":"USER_IDENTIFICATION_NUMBER",
"amount":AMOUNT,
"status":"TXN_SUCCESS"
}



For Failed Or Cancle Payments:
{
"orderid":"ORDER_ID",
"userid":"USER_IDENTIFICATION_NUMBER",
"amount":AMOUNT,
"status":"TXN_FAILURE"
}



PHP:
// Include the database connection file
include('conn/dbconnect.php');

// Get the raw JSON data from the request
$jsonData = file_get_contents('php://input');

// Decode the JSON data into a PHP associative array
$data = json_decode($jsonData, true);

if ($data && isset($data['orderid'], $data['userid'], $data['amount'], $data['status'])) {
    // Get the values from the JSON data
    $orderid = $data['orderid'];
    $userid = $data['userid'];
    $amount = $data['amount'];
    $status = $data['status'];

    // Database query to update the status based on the orderid and userid
    $sql = "UPDATE your_table_name SET status = ? WHERE orderid = ? AND userid = ?";
    $stmt = $conn->prepare($sql);
    $stmt->bind_param("sss", $status, $orderid, $userid);

    if ($stmt->execute()) {
        // Update successful
        $response = array(
            'status' => 'success',
            'message' => 'Status updated successfully'
        );
    } else {
        // Update failed
        $response = array(
            'status' => 'error',
            'message' => 'Failed to update status'
        );
    }
} else {
    // Invalid JSON data
    $response = array(
        'status' => 'error',
        'message' => 'Invalid JSON data'
    );
}

// Send the response as JSON
header('Content-Type: application/json');
echo json_encode($response);


C#:
using System;
using System.Net;
using System.Net.Http;
using System.Text;
using System.Threading.Tasks;

namespace YourNamespace
{
    class Program
    {
        static async Task Main(string[] args)
        {
            // Replace the API endpoint URL with the appropriate URL
            string apiUrl = "https://your-api.com/update-status";
            string jsonData = @"{
                ""orderid"": ""ORDER_ID"",
                ""userid"": ""USER_IDENTIFICATION_NUMBER"",
                ""amount"": AMOUNT,
                ""status"": ""TXN_SUCCESS""
            }";

            using (var httpClient = new HttpClient())
            {
                // Set the Content-Type header to application/json
                httpClient.DefaultRequestHeaders.Add("Content-Type", "application/json");

                // Send the HTTP POST request with the JSON data
                var response = await httpClient.PostAsync(apiUrl, new StringContent(jsonData, Encoding.UTF8, "application/json"));

                // Read the response content
                var responseContent = await response.Content.ReadAsStringAsync();

                // Process the response content which contains the response from the API
                // For example, you can deserialize the JSON response to check if the update was successful
                // You can use a JSON library like Newtonsoft.Json to deserialize the response
                // For this example, we'll simply display the response
                Console.WriteLine(responseContent);
            }
        }
    }
}



Node.JS:
const express = require('express');
const bodyParser = require('body-parser');
const app = express();
const port = 3000; // Replace with your desired port number

// Middleware to parse JSON bodies
app.use(bodyParser.json());

app.post('/update-status', (req, res) => {
    const data = req.body;

    if (data && data.orderid && data.userid && data.amount && data.status) {
        const { orderid, userid, status } = data;

        // Database query to update the status based on the orderid and userid
        // Replace this with your database update query
        // For example, if you are using a library like 'mysql2' for MySQL:
        /*
        connection.query(
            'UPDATE your_table_name SET status = ? WHERE orderid = ? AND userid = ?',
            [status, orderid, userid],
            (error, results) => {
                if (error) {
                    res.status(500).json({
                        status: 'error',
                        message: 'Failed to update status'
                    });
                } else {
                    res.json({
                        status: 'success',
                        message: 'Status updated successfully'
                    });
                }
            }
        );
        */
        // Adjust the above code based on the database library you are using

        // For this example, we'll simply return a response
        res.json({
            status: 'success',
            message: 'Status updated successfully'
        });
    } else {
        res.status(400).json({
            status: 'error',
            message: 'Invalid JSON data'
        });
    }
});

app.listen(port, () => {
    console.log(`Server is running on http://localhost:${port}`);
});


                

To Get Payment Status of generated order by your end or server.

Field Discription
orderid In This field you will get orderid which you can use for update oreder
userid Userid MOBILE_NUMBER/PRIMARY_NUMBER. For identify user.
amount Its integer formate AMOUNT for process transaction. if user generate Rs. 1000 payment and he/she make payment of Rs. 500 so we can send actual amount in response so you can update it for process and deposite amount to them wallet.
status The successfull transaction status is TXN_SUCCESS. Failed or expired order status is TXN_FAILURE or this status also for cancle payment by user.

Get Payment Status by S2S


# Here is a curl example
curl --location 'https://smartifinitypay.com/api/statusapi.php' \
--header 'Content-Type: application/json' \
--header 'Cookie: PHPSESSID=PHP_SESSION_ID' \
--data '{
    "orderid" : "ORDER_ID",
    "api" : "ENTER_YOUR_OWN_API_KEY"
}'
PHP:

$apiUrl = 'https://smartinfinitypay.com/api/statusapi.php';

// API Key (replace with your actual API key)
$apiKey = 'ENTER_YOUR_API_KEY';

// Data to be sent in the request
$data = array(
    'orderid' => 'ENTER_YOUR_ORDERID',
    'api' => $apiKey,
);

// Convert the data to JSON format
$jsonData = json_encode($data);

// Initialize cURL session
$ch = curl_init($apiUrl);

// Set cURL options
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json'));
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $jsonData);

// Execute the cURL session
$response = curl_exec($ch);
print_r($response);



                

To get characters you need to make a POST call to the following url :
https://smartinfinitypay.com/api/statuscheck.php



Result example :

{
"status":"pending",
"message":"Payment is pending",
"payment_status":"Pending"
}

{
"status":"success",
"message":"Payment is successful",
"payment_status":"TXN_SUCCESS"
}

{
"status":"failed",
"message":"Payment failed",
"payment_status":"TXN_FAILURE"
}

{
"status":"error",
"message":"Order or payment reference not found",
"payment_status":"not_found"
}
                

QUERY PARAMETERS

Field Type Description
orderid Integer 12 Digit Of Orderid
api String Place Your Own API Key which is given by system admin. for get api contact to system admin.