S2S UPI Collection Integration
Enable UPI collect flows via EximPe’s server-to-server API with minimal redirection
The Server-to-Server (S2S) UPI Collection integration eliminates redirection hops by validating the VPA and initiating transactions directly from your backend. Deliver a seamless, secure checkout experience for your customers.
Validate VPA
Ensure the customer’s VPA is valid before proceeding
Initiate Payment
Create a UPI collect transaction via server-to-server API
Check Status
Poll the Verify Payment API for real-time updates
Server Callback
Receive asynchronous status updates via webhook
Prerequisites
Before you begin, ensure you have:
- Merchant Key & Salt: Your EximPe merchant key and salt for hash generation.
- Callback URL: A publicly accessible endpoint configured in your EximPe dashboard for S2S callbacks.
- HTTP Client: Ability to perform HTTPS
GET
andPOST
requests from your server. - JSON & Hashing: Familiarity with JSON request bodies and SHA-512 hash computation.
Integration Steps
The integration consists of four steps:
- Validate VPA
- Initiate Payment
- Check Transaction Status
- Server-to-Server Callback
Process Flow
Step 1: Validate VPA
This web service will let you validate VPA if it is a valid VPA or not.
After the customer enters VPA on your website, you need to call this API to check for VPA validation. If VPA is valid, you need to proceed with the next step.
Sample Request
Response
Collect the response in the UPI Collection under API Reference. The response for the S2S payment request is not similar to Merchant Hosted or PayU Hosted Checkout. For description of response parameters, refer to Additional Info for Payment APIs.
Step 2: Initiate the payment to EximPe
To start with, the request is raised from the Merchant to PayU with the required transaction mandatory/optional parameters. This needs to be a server-to-server curl call request
For the S2S UPI Collection request, you must include these additional parameters beyond the standard checkout fields:
collection_mode
: must be set to"s2s"
upi_flow_type
: must be set to"collection"
vpa
: the customer’s UPI ID (e.g."john.doe@payu"
)upi_app_name
: the chosen UPI app identifier (e.g."others"
)buyer.ip_address
: the customer’s device IP addressbuyer.user_agent
: the customer’s browser or app user-agent string
Step 3: Check UPI transaction status
Check the UPI transaction status using the Verify Order API API. For more information, refer to Verify Order API
Step 4: Check the S2S callback response
EximPe can also send a server-to-server callback response whenever the transaction status gets updated.
For more information, see the Payment Successful response