Docs
Developer Platform  /  API Documentation
FLINPE API · Production

UPI payments,
from API to confirmation.

Create an order, show hosted checkout or app-specific UPI intents, render the returned QR, and reconcile the final status from your server.

REST APIUPI IntentDynamic QRStatic QRCallbacks
● LIVECreate & track orders

Server-to-server order creation with merchant-scoped status lookup.

● LIVECheckout, intents & QR

Use the hosted payment URL or render returned UPI app links and QR.

● LIVEStatic QR capture

Record Paytm static QR credits with unique-UTR and merchant validation.

Get started

Quickstart

Complete these four steps for the first production payment.

1. Copy your token

Sign in to Merchant Dashboard → Developer and copy user_token.

2. Create an order

Call the API from your backend using a new order_id.

3. Start payment

Redirect to payment_url, open a returned deep link, or display qrUrl.

4. Confirm server-side

Poll Check Order and consume the merchant callback idempotently.

curl -X POST 'https://flinpe.com/v1/api/create-order.php' \ -H 'Content-Type: application/json' \ -d '{ "user_token": "YOUR_USER_TOKEN", "order_id": "ORD_10001", "amount": 500, "customer_name": "Amit", "customer_mobile": "9876543210", "redirect_url": "https://merchant.example/payment-return" }'
Get started

Authentication

Production pay-in APIs accept your merchant user_token in the request body. Obtain it from Merchant Dashboard → Developer.

Server-side only: never put the token in browser JavaScript, mobile applications, QR content, logs, screenshots, or public source control.
JSON
{"user_token":"YOUR_USER_TOKEN"}
Get started

Production base URL

HTTPShttps://flinpe.com
APICanonical production endpoint
Create orderPOST /v1/api/create-order.php
Check orderPOST /v1/api/check-order.php
Hosted checkoutGET /pay/checkout.php?order_id=...
Paytm static capturePOST /webhooks/paytm-static.php
Send API requests from your backend. Both JSON and application/x-www-form-urlencoded bodies are accepted by pay-in endpoints.
UPI pay-ins

Create order

Creates a routed UPI order. A successful response contains hosted checkout, the raw UPI URI, app deep links, and a QR URL when supplied by the active route.

POSThttps://flinpe.com/v1/api/create-order.php

Request fields

FieldTypeRequirementDescription
user_tokenstringRequiredMerchant token
order_idstringRequiredYour unique order reference. Never reuse it.
amountnumberRequiredPositive INR amount. Use whole-rupee values.
customer_mobilestringOptional10 digits when supplied
customer_namestringOptionalPayer display name
redirect_urlURLOptionalBrowser return destination after checkout
remark1stringOptionalYour internal note
remark2stringOptionalAdditional metadata note
JSON request
{ "user_token": "YOUR_USER_TOKEN", "order_id": "ORD_10001", "amount": 500, "customer_name": "Amit", "customer_mobile": "9876543210", "redirect_url": "https://merchant.example/payment-return", "remark1": "Invoice 4821" }
Successful response
{ "status": true, "message": "Order created successfully.", "result": { "orderId": "ORD_10001", "payment_url": "https://flinpe.com/pay/checkout?order_id=ORD_10001", "upi": "upi://pay?pa=merchant@bank&pn=Merchant&am=500&cu=INR&tr=ORD_10001", "qrUrl": "https://gateway.example/qr/...", "gateway": "paytm", "route": "Harsh Paytm", "payin_route": 80, "deeplinks": { "paytm": "paytmmp://pay?...", "phonepe": "phonepe://pay?...", "gpay": "tez://upi/pay?...", "bhim": "bhim://pay?...", "upi": "upi://pay?..." }, "securestack_order_id": "gateway-order-reference" } }
UPI pay-ins

Response fields

FieldHow to use it
payment_urlRecommended hosted checkout. Redirect the customer here.
upiGeneric UPI URI. Use unchanged or encode it into a QR.
qrUrlDynamic QR image for this order and amount.
deeplinks.paytmOpen Paytm directly on supported mobile devices.
deeplinks.phonepeOpen PhonePe directly.
deeplinks.gpayOpen Google Pay directly.
deeplinks.bhimOpen BHIM directly.
securestack_order_idGateway reference for support and reconciliation; do not treat it as payment success.
Some route/provider combinations may omit an app-specific link. Hide that app button when its field is empty and retain the generic upi option.
Customer experience

Hosted checkout

The fastest integration is a redirect to the exact payment_url returned by Create Order.

const result = createOrderResponse.result; window.location.assign(result.payment_url);
The redirect URL is a customer navigation event, not proof of payment. Always verify the order from your backend.
Customer experience

UPI deep links

Use app links exactly as returned. Do not replace their schemes with intent:// and do not rebuild signed/provider parameters.

Mobile buttons
<a href="PAYTM_LINK_FROM_RESPONSE">Pay with Paytm</a> <a href="GPAY_LINK_FROM_RESPONSE">Pay with Google Pay</a> <a href="PHONEPE_LINK_FROM_RESPONSE">Pay with PhonePe</a> <a href="UPI_LINK_FROM_RESPONSE">Open any UPI app</a>
AppResponse fieldTypical scheme
Paytmdeeplinks.paytmpaytmmp://
Google Paydeeplinks.gpaytez://
PhonePedeeplinks.phonepephonepe://
BHIMdeeplinks.bhimbhim://
Any UPI appdeeplinks.upi / upiupi://pay
UPI schemes work on compatible mobile devices with the selected app installed. On desktop, show the QR instead.
Customer experience

Intent / dynamic QR

Each API order can return an amount-locked dynamic QR. Prefer qrUrl. If it is empty, generate a QR locally from the exact upi string using a trusted QR library.

Render returned QR
<img src="QR_URL_FROM_CREATE_ORDER" alt="Scan to pay ₹500">
Generate QR locally from UPI URI
// Server receives result.upi from FLINPE. // Encode this exact value; do not decode and rebuild it. QRCode.toCanvas(canvasElement, result.upi, { width: 280, errorCorrectionLevel: "M" });
Dynamic QR: tied to one order and amount. Static QR: permanent QR where the customer enters the amount. Use dynamic QR for ecommerce order reconciliation.
UPI pay-ins

Check order status

Call from your backend. FLINPE may refresh a pending order from the active gateway before returning the result.

POSThttps://flinpe.com/v1/api/check-order.php
Request
curl -X POST 'https://flinpe.com/v1/api/check-order.php' \ -H 'Content-Type: application/json' \ -d '{"user_token":"YOUR_USER_TOKEN","order_id":"ORD_10001"}'
Response
{ "status": true, "message": "Order fetched.", "result": { "orderId": "ORD_10001", "txnStatus": "SUCCESS", "amount": 500, "utr": "520003750049", "method": "harsh_paytm", "payin_route_used": 80 } }

Recommended polling: every 3–5 seconds while the customer is on checkout, then reduce frequency. Stop on a terminal status.

Static QR

Permanent static QR

Admin enables Static QR for the merchant. The merchant then opens Dashboard → QR & static link to view and download the permanent QR.

Admin enables access

Admin → Merchants → Edit → Static QR → On.

Merchant gets QR

Merchant Dashboard → QR & static link.

Customer enters amount

The permanent QR does not lock an amount.

Capture confirms credit

SecureStack or the Paytm capture endpoint records the payment.

For order-level checkout, use Create Order and dynamic QR. Static QR is best for counters, stores, invoices, and direct collections.
Static QR

Paytm static payment capture

An authorized notification forwarder can submit a received Paytm credit. This is an inbound FLINPE endpoint, separate from your merchant callback.

POSThttps://flinpe.com/webhooks/paytm-static.php
Headers
Content-Type: application/json X-Klivio-Token: YOUR_USER_TOKEN X-Klivio-Signature: OPTIONAL_HMAC_SHA256_OF_RAW_BODY
Payload
{ "provider": "paytm", "sender": "PAYTM", "amount": 599, "utr": "20260920011060000308530975143710606", "vpa": "merchant@paytm", "payer_name": "Customer" }
Optional signature (PHP)
$rawBody = json_encode($payload, JSON_UNESCAPED_SLASHES); $signature = hash_hmac('sha256', $rawBody, $merchantUserToken);
UTR is mandatory and idempotent. A duplicate UTR does not credit the wallet twice. Never forward OTPs, UPI PINs, bank passwords, or unrelated SMS content.
Events

Merchant callback

Set the merchant callback URL in the dashboard. On a confirmed payment, FLINPE sends an HTTP POST using application/x-www-form-urlencoded.

Callback fields
status=SUCCESS order_id=ORD_10001 amount=500 customer_mobile=9876543210 utr=520003750049 txn_id=520003750049
PHP receiver
<?php $orderId = trim($_POST['order_id'] ?? ''); $status = strtoupper(trim($_POST['status'] ?? '')); $utr = trim($_POST['utr'] ?? ''); if ($orderId === '' || $status === '') { http_response_code(400); exit('invalid'); } // Confirm independently with Check Order before fulfilment. // Apply your business action idempotently by order_id. http_response_code(200); echo 'ok';
Delivery contract: callback delivery is best-effort. Your system must use Check Order for recovery and must tolerate duplicate or delayed events.
Events

Safe reconciliation

Store PENDING first

Persist your order before calling FLINPE.

Verify server-side

Never trust the redirect query string or frontend success screen.

Use idempotency

Fulfil once per unique order_id; store the UTR.

Run recovery polling

Recheck pending orders after callback timeouts or outages.

Code examples

PHP integration

<?php $payload = [ 'user_token' => getenv('FLINPE_API_KEY'), 'order_id' => 'ORD_' . bin2hex(random_bytes(8)), 'amount' => 500, 'customer_name' => 'Amit', 'customer_mobile' => '9876543210', 'redirect_url' => 'https://merchant.example/payment-return' ]; $ch = curl_init('https://flinpe.com/v1/api/create-order.php'); curl_setopt_array($ch, [ CURLOPT_POST => true, CURLOPT_POSTFIELDS => json_encode($payload), CURLOPT_HTTPHEADER => ['Content-Type: application/json'], CURLOPT_RETURNTRANSFER => true, CURLOPT_TIMEOUT => 30 ]); $response = json_decode(curl_exec($ch), true); curl_close($ch); if (!($response['status'] ?? false)) { throw new RuntimeException($response['message'] ?? 'Order creation failed'); } header('Location: ' . $response['result']['payment_url']);
Code examples

Node.js integration

const response = await fetch("https://flinpe.com/v1/api/create-order.php", { method: "POST", headers: {"content-type": "application/json"}, body: JSON.stringify({ user_token: process.env.FLINPE_API_KEY, order_id: "ORD_" + crypto.randomUUID(), amount: 500, customer_name: "Amit", customer_mobile: "9876543210", redirect_url: "https://merchant.example/payment-return" }) }); const data = await response.json(); if (!data.status) throw new Error(data.message); console.log(data.result.payment_url);
Code examples

Mobile payment buttons

Your backend should create the order and return only payment presentation fields to the browser.

function setPaymentLinks(result) { const links = { paytm: result.deeplinks?.paytm, gpay: result.deeplinks?.gpay, phonepe: result.deeplinks?.phonepe, upi: result.upi }; for (const [id, href] of Object.entries(links)) { const el = document.getElementById(id); if (!href) { el.hidden = true; continue; } el.href = href; } if (result.qrUrl) document.getElementById("upi-qr").src = result.qrUrl; }
Reference

Order statuses

StatusMeaningMerchant action
PENDINGWaiting for final confirmationKeep polling; do not fulfil
SUCCESSPayment confirmedFulfil idempotently
FAILEDGateway reported failureAllow a new order/payment attempt
REJECTEDPayment/order rejectedDo not fulfil
REFUNDOrder marked refunded in reportingReconcile refund operations separately
Reference

Errors

Pay-in validation errors can be returned as HTTP 200 with status:false. Always inspect the JSON body as well as HTTP status.

Message / codeCauseFix
Invalid user_token.Token not mapped to a merchantCopy the token again from Developer
Duplicate order_id.Reference already existsGenerate a new unique ID
Amount is below merchant minimum.Configured minimum not metIncrease amount or contact admin
Assigned payin route is not availableMerchant route is unsupported/inactiveAsk admin to assign an active route
Order not found.Order/token pair does not matchUse the same merchant token used at creation
401Static capture token/signature failedCheck headers and raw-body signature
500Temporary server/provider issueRetry safely with the same order reference only after checking status
Reference

Security practices

Keep tokens in secrets storage

Load credentials from environment variables or a secret manager.

Use HTTPS callbacks

Reject plaintext callback URLs in production.

Verify before fulfilment

Check status with your token and order ID.

Redact logs

Do not log tokens, raw bank notifications, OTPs, or customer secrets.

Prevent SSRF

Keep callback infrastructure public, fixed and monitored.

Alert on duplicate UTR

Never apply the same payment reference twice.

Launch

Go-live checklist

Merchant active and KYC approved

Confirm account access, limits and route assignment.

Token stored server-side

No production credential in frontend code.

Unique order IDs

Use collision-resistant references and persist before API calls.

Mobile and desktop tested

Test app intents on mobile and QR on a separate device.

Callback + polling tested

Recover successfully when a callback is delayed or missed.

Support references stored

Keep order ID, gateway reference and UTR with timestamps.

Integration support: [email protected]
COLLECT / DIGITAL ASSETS

USDT Payin

Give each payment a fresh deposit address. Ask the customer to send the exact amount on the selected network, then confirm the provider status. Minimum amount: $20 USD.

● ACTIVEStatic payment link

Customer enters the USD amount, then receives a fresh address and QR.

● ACTIVEDynamic deposit

Merchant creates an amount-specific deposit and tracks its provider status.

● PROVIDER CONFIGServer-side key

Admin configures the collection key; it is not exposed to customers.

Merchant tools: Open USDT Payin. The static link and QR are shown there. A created address is not proof of payment.
How to collect: Open Merchant Dashboard → USDT Payin, create an amount-specific deposit or copy your permanent customer link. FLINPE sends provider requests using the admin-configured key.
Provider reference · server side
POST/api/external/deposits/coins

List coins

Discover the coins accepted by the active provider before creating a deposit.

POST/api/external/deposits/networks

List networks

Choose the exact network code returned for the selected coin.

{"currency":"USDT"}
POST/api/external/deposits/create

Create deposit

Generate a unique order reference and save the returned provider ID, address, exact payable amount and network.

{"amount":20,"currency":"USDT","network":"PROVIDER_NETWORK_CODE","order_id":"YOUR_UNIQUE_ORDER"}
POST/api/external/deposits/status

Check deposit

Use the provider deposit ID to check the final status. Reconcile a completed result before fulfilment or wallet credit.

{"id":"PROVIDER_DEPOSIT_ID"}
FLINPE integration: Merchants create and track deposits from the dashboard or hosted payment link. Gateway credentials stay on FLINPE servers. Confirm the final payment status before fulfilment.