What is the Matrix Pay UPI API?
The Matrix Pay UPI API is a RESTful web service that allows developers to programmatically generate UPI payment links, intent URIs, and dynamic QR codes. By integrating this API, Indian businesses can collect payments directly into their current accounts via zero-fee peer-to-peer (P2P) or peer-to-merchant (P2M) routing without intermediary nodal accounts holding the funds.
Key Capabilities for Developers:
- Instant Payment Links: Generate shareable payment URLs via standard POST requests.
- Dynamic Intent URIs: Trigger GPay, PhonePe, and Paytm apps directly on mobile devices.
- Automated Webhooks: Receive real-time JSON payloads the second a transaction succeeds.
- Smart Routing Engine: The API handles load balancing across multiple VPA accounts automatically.
Authentication & Security
Matrix Pay prioritizes security by implementing strict HMAC-SHA256 signature validation. Every API request must be signed using your Secret API Key to prevent replay attacks and payload tampering.
Required Headers:
X-Client-Id: Your unique merchant identifier.X-Timestamp: The current UNIX timestamp (requests older than 5 minutes are rejected).X-Nonce: A unique random string for each request to prevent replays.X-Signature: The HMAC-SHA256 hash of your payload, timestamp, and nonce.
Core Endpoints Overview
POST /create_order
Creates a new payment intent and returns the checkout URLs.
Common Use Case: Call this endpoint when a user clicks "Checkout" on your e-commerce site or application. You supply the order ID, amount, and customer details, and the API responds with a hosted checkout page URL and a direct UPI Intent URI.
POST /check_order_status
Polls the server for the definitive status of a transaction.
Common Use Case: If a webhook fails to reach your server due to network issues, you can programmatically verify the status of any transaction using its unique order reference ID.
Ready to start coding?
To view code snippets in Python, Node.js, PHP, Go, and C#, and to test the API directly from your browser, you need to access the interactive Sandbox.
Go to Interactive Sandbox