All API requests must include the following headers for authentication and routing:
| Header | Description |
|---|---|
x-fundgate-userid | Your permanent Account ID |
x-fundgate-upi | The specific UPI ID from your Merchant Accounts & Keys tab. |
x-api-key | The corresponding secret API Key for that UPI ID. |
Create a secure payment order and retrieve the raw UPI intent URL and token for your custom UI integration.
curl -X POST https://fundgate.mazid.dev/api/developer/create \
-H "x-fundgate-userid: usr_demo_12345" \
-H "x-fundgate-upi: demo@ybl" \
-H "x-api-key: sk_live_demo1234567890" \
-H "Content-Type: application/json" \
-d '{"amount": 199.00}'{
// The amount to charge (Float)
// Minimum: 1.00
"amount": 199.00
}{
"status": "success",
"data": {
"display_id": "REF-8VANECVO", // User-friendly reference ID
"amount": 199.00, // The exact amount requested
"upi_url": "upi://pay?pa=dummy@paytm...", // Raw intent URL for native app redirection
"payment_token": "ab12cd34...", // Secure token required to verify the payment later
"payment_link": "https://fundgate.mazid.dev/pay/order/..." // Hosted checkout page URL
}
}Verify the status of a payment using the token. You should poll this or call it on successful UI flow.
curl -X POST https://fundgate.mazid.dev/api/developer/verify \
-H "x-fundgate-userid: usr_demo_12345" \
-H "x-fundgate-upi: demo@ybl" \
-H "x-api-key: sk_live_demo1234567890" \
-H "Content-Type: application/json" \
-d '{"payment_token": "ab12cd34..."}'{
// The token returned from /create endpoint
"payment_token": "ab12cd34..."
}{
"status": "success",
"data": {
"status": "PAID", // Status of the payment (PAID, PENDING, EXPIRED, FAILED)
"paytm_txn_id": "202607291111...", // The bank transaction ID from the gateway
"amount": 199.00, // The exact amount received
"date": "2026-07-29 12:59:40.0" // Timestamp of the successful transaction
}
}{
"status": "pending",
"message": "Payment is still pending" // Or "Processing"
}// 1. Amount Tampering / Mismatch
{
"status": "error",
"message": "Amount mismatch detected"
}
// 2. Already Redeemed
{
"status": "success",
"message": "Order already redeemed",
"data": { "status": "PAID", "amount": 199.00 }
}
// 3. 10-Minute Expiry
{
"status": "error",
"message": "Order has expired (10 minutes validity)"
}
// 4. Invalid Token
{
"status": "error",
"message": "Invalid payment token"
}