zaprupee API Documentation
Zaprupee Developer Documentation
Welcome to the official Zaprupee payment gateway integration and API documentation. Get started quickly and securely.
Introduction
zaprupee provides simple APIs to integrate UPI payments into your application. This documentation covers the Create Order and Check Order Status APIs.
Base URL
All API endpoints start with: https://zaprupee.com/api/
Authentication
All requests require your user_token
for authentication. This token is provided when you register as a merchant.
Create Order API
Initiate a new payment transaction and get a payment URL for your customer.
/create-order
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
customer_mobile | String | Yes | Customer's 10-digit mobile number |
user_token | String | Yes | Your merchant authentication token |
amount | Numeric | Yes | Transaction amount (minimum ₹1) |
order_id | String | Yes | Your unique order identifier (max 50 chars) |
redirect_url | URL | Yes | URL to redirect after payment completion |
remark1 | String | No | Additional remark (max 100 chars) |
remark2 | String | No | Additional remark (max 100 chars) |
Important Notes
- Order Timeout: 30 minutes. Orders automatically fail after timeout
- Content-Type: application/x-www-form-urlencoded
- Order ID: Must be unique per transaction
Request Example
POST /api/create-order Content-Type: application/x-www-form-urlencoded customer_mobile=8145344963&user_token=4f4f2d5860edb2ee76ba899d3b63bd02&amount=1&order_id=8787772321800&redirect_url=https://yourwebsite.com/callback&remark1=testremark&remark2=testremark2
Success Response (200 OK)
{ "status": true, "message": "Order Created Successfully", "result": { "orderId": "1234561705047510", "payment_url": "https://yourwebsite.com/payment/pay.php?data=MTIzNDU2MTcwNTA0NzUxMkyNTIy" } }
Error Responses
{ "status": false, "message": "Order_id Already Exist" } { "status": false, "message": "Invalid user_token" } { "status": false, "message": "Amount must be at least 1" }
Check Order Status API
Check the status of an existing order/transaction.
/check-order-status
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
user_token | String | Yes | Your merchant authentication token |
order_id | String | Yes | The order ID you want to check |
Request Example
POST /api/check-order-status Content-Type: application/x-www-form-urlencoded user_token=2048f66bef68633fa3262d7a398ab577&order_id=8052313697
Success Response (200 OK)
{ "status": "COMPLETED", "message": "Transaction Successfully", "result": { "txnStatus": "COMPLETED", "resultInfo": "Transaction Success", "orderId": "784525sdD", "status": "SUCCESS", "amount": "1", "date": "2024-01-12 13:22:08", "utr": "454525454245" } }
Possible Status Values
- COMPLETED: Payment successful
- PENDING: Payment initiated but not completed
- FAILED: Payment failed or expired
- ERROR: Technical error occurred
Error Responses
{ "status": "ERROR", "message": "Order not found" } { "status": "ERROR", "message": "Invalid user_token" }
Best Practices
Order ID Generation
Generate unique order IDs on your server. Recommended format: [merchant_prefix][timestamp][random_digits]
Error Handling
Always check the status
field in responses and handle all possible error cases.
Webhook Integration
For real-time notifications, implement our webhook API to receive payment status updates instantly.
Testing
Use our sandbox environment for testing with test amounts (₹1-₹10 recommended).
Support
For technical support or questions about API integration:
- Email: support@zaprupee.com
- Phone: +91 9000233900 (10AM-6PM IST)
- WhatsApp: +91 9000233900