Everything you need to integrate UPIExpress Dynamic UPI QR payments into your application.
Get started with UPIExpress API in just a few simple steps:
Create an account and get your API credentials from the dashboard.
Connect your existing UPI merchant account (BharatPe, PhonePe, GPay, etc.) with UPIExpress.
Use the /api/create_order endpoint to generate a dynamic QR code.
curl -X POST https://upiexpress.com/api/create_order \
-H "Content-Type: application/json" \
-d '{
"key": "your-api-key",
"client_txn_id": "unique-id-123",
"amount": "100",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_mobile": "9876543210",
"redirect_url": "https://yourwebsite.com/thank-you"
}'
Use webhooks or poll the status API to get payment confirmation.
For testing, use our sandbox environment. Contact support to get sandbox credentials.
All API requests require authentication using your API key. Include the API key in the request body for all endpoints.
Include your API key in the request body:
{
"key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
// other parameters...
}
https://upiexpress.com/api/create_order
Create a new payment order and generate a dynamic UPI QR code.
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Your API key |
| client_txn_id | string | Yes | Unique transaction ID from your system |
| amount | string | Yes | Transaction amount (in INR) |
| customer_name | string | Yes | Customer's full name |
| customer_email | string | Yes | Customer's email address |
| customer_mobile | string | Yes | Customer's mobile number (10 digits) |
| redirect_url | string | Yes | URL to redirect after payment |
| webhook_url | string | No | Callback URL for payment status updates |
| note | string | No | Product/service description (max 25 chars) |
| udf1 - udf5 | string | No | Custom fields for your reference |
{
"key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"client_txn_id": "order_123456",
"amount": "100.50",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_mobile": "9876543210",
"redirect_url": "https://yourstore.com/thank-you",
"webhook_url": "https://yourstore.com/webhook/upi",
"note": "Premium Subscription",
"udf1": "user_id_123"
}
{
"status": true,
"msg": "Order Created",
"data": {
"order_id": 500041,
"payment_url": "https://upiexpress.com/payment/yiVaLXVNv4PDi5H72k4u0nx0C7DAfHHXXxwKMJ8xL855PX6ByS",
"upi_id_hash": "caccc40fd94...",
"upi_intent": {
"bhim_link": "upi://pay?pa=...",
"phonepe_link": "phonepe://pay?pa=...",
"paytm_link": "paytmmp://pay?pa=...",
"gpay_link": "tez://upi/pay?pa=..."
}
}
}
https://upiexpress.com/api/check_order_status
Check the status of a payment order. Rate limited to 500 requests per minute.
| Parameter | Type | Required | Description |
|---|---|---|---|
| key | string | Yes | Your API key |
| client_txn_id | string | Yes | Your unique transaction ID |
| txn_date | string | No | Transaction date (DD-MM-YYYY format) |
{
"key": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
"client_txn_id": "order_123456"
}
{
"status": true,
"msg": "Transaction found",
"data": {
"id": 66,
"amount": 100.50,
"txn_id": "UPIEX50004120220115144330001",
"order_id": 500041,
"client_txn_id": "order_123456",
"customer_name": "John Doe",
"customer_email": "john@example.com",
"customer_mobile": "9876543210",
"upi_txn_id": "209876543210",
"status": "success",
"note": "Premium Subscription",
"udf1": "user_id_123",
"txnAt": "2022-01-15",
"createdAt": "2022-01-15T14:43:30.000Z"
}
}
Webhooks allow you to receive real-time notifications about payment status changes. Configure your webhook URL to automatically receive updates.
When a payment status changes, we'll POST JSON data to your webhook URL:
{
"id": 66,
"amount": 100,
"convenience_fee": 0,
"total_amount": 100,
"txn_id": "UPIEX50004120220115144330001",
"order_id": 500041,
"client_txn_id": "abcd1234",
"customer_name": "Jon Doe",
"customer_email": "jondoe@gmail.com",
"customer_mobile": "9876543210",
"upi_txn_id": "209876543210",
"status": "success",
"note": "Product information",
"udf1": "",
"udf2": "",
"udf3": "",
"redirect_url": "https://upiexpress.com",
"webhook_url": "https://upiexpress.com",
"txnAt": "2022-01-15",
"createdAt": "2022-01-15T14:43:30.000Z",
"MerchantId": "AB12s87d6f5g4h3j2k11Øm9n8o7p6q5r4"
}
| Event | Description |
|---|---|
| payment.success | Payment completed successfully |
| payment.failed | Payment failed |
| payment.pending | Payment initiated but pending |
| payment.expired | Payment link expired |
All API endpoints return consistent error responses. Always handle errors gracefully in your implementation.
| HTTP Status | Error Code | Message | Solution |
|---|---|---|---|
| 400 | INVALID_API_KEY | Invalid API key provided | Check your API key |
| 400 | MISSING_PARAMETER | Required parameter missing | Check request parameters |
| 402 | PLAN_EXPIRED | Your plan has expired | Renew your subscription |
| 404 | ORDER_NOT_FOUND | Transaction not found | Verify order ID |
| 429 | RATE_LIMITED | Too many requests | Wait and retry |
| 500 | INTERNAL_ERROR | Internal server error | Contact support |
{
"status": false,
"error": {
"code": "INVALID_API_KEY",
"message": "Invalid API key provided",
"details": "The API key provided is invalid or expired"
}
}
Always generate unique client_txn_id for each transaction. Never reuse IDs.
Use webhooks for real-time updates instead of polling the status API frequently.
Payment links expire after 15 minutes. Handle expired payments gracefully.
Store API keys securely in environment variables, never in client-side code.
Always verify the upi_id_hash before redirecting users to payment URLs.
Implement logging for webhook deliveries and set up alerts for failures.
Payment links are valid for 15 minutes. After that, a new order must be created.
Yes, you can customize QR code size and colors through our dashboard settings.
Yes, contact support to get access to our sandbox environment for testing.
All major UPI apps: GPay, PhonePe, Paytm, BHIM, Amazon Pay, and 200+ other banks.
Refunds are processed directly from your connected UPI merchant account dashboard.
Detailed guides and tutorials
Get help from our team
Current API Status: ● Operational
Last updated: Just now | Uptime: 99.9%
Join thousands of businesses accepting payments with UPIExpress. Get started in minutes with our easy-to-use API.