Introduction
Hosted Checkout is a pre-built payment page. You create an order from your server, hand the returned session to the EximPe JS SDK, and the buyer completes the payment on EximPe’s page — card and UPI credentials never touch your servers.No UI to build
One SDK call opens a payment page that already handles every method you have enabled
Nothing sensitive to hold
Card and UPI credentials are entered on EximPe’s page, so they stay outside your PCI scope
Verified server-side
Confirm every outcome from your backend — never from the browser redirect alone
Collection is only half the flow. A successful payment is collected in India but not yet cleared to settle abroad — it is created in Action Required like any other v3 payment, and you must still assert the compliance details its purpose code requires. See Step 5.
Prerequisites
Before you begin, ensure you have:- Credentials: Your
X-Client-IDandX-Client-Secret, andX-API-Version: 3.0.0on every call - Domain Whitelist: Your website domain whitelisted for integration
- Return URL: A URL on your site that EximPe redirects the buyer back to
- Webhook URL: A secure endpoint to receive payment status updates
- Encryption Key: Needed to verify the callback hash in Step 4
PSP callers additionally send
X-Merchant-ID naming the sub-merchant the order belongs to.- Your backend creates an order and receives a
session_id. - Your frontend opens the checkout page with that session, via the EximPe JS SDK.
- Your backend confirms the outcome from the Order Status API or the webhook.
Step 1: Create an order
Create the order from your backend — never from the browser, which would expose your client secret.collection_mode has no server-side default — send "hosted_payment" explicitly. Omitting it (or sending an unrecognised value) fails with {"collection_mode": "Invalid collection mode"}.mop_type is optional here. Include it (upi, credit_card, debit_card, net_banking, qr) only to pre-select a method on the checkout page.Create Order API
Every parameter, constraint, and response field for this endpoint.
Step 2: Open the checkout page
1
Include the JS SDK
Load the SDK from a versioned URL with Subresource Integrity (SRI):
2
Initialize the SDK
mode is required and must be sandbox or production; anything else throws ERR_SDK_001. It also picks the API host for you — https://api-pacb-uat.eximpe.com in sandbox, https://api-pacb.eximpe.com in production.3
Open the checkout
Pass the
session_id from Step 1:Error handling
checkout() returns a promise — always attach a .catch(). An invalid or expired session surfaces as:
Common causes: the session is older than 15 minutes, it is malformed, or it has already been used for a completed payment. In every case the fix is the same — create a new order.
Complete example
Step 3: Verify the payment
Once the buyer completes or abandons the payment, EximPe redirects them to yourreturn_url — the same redirect happens whether the payment succeeded or failed. Confirm the real outcome from your backend before you deliver anything.
Use the
order_id from Step 1 here — not the session_id.Get Order Status API
Full request and response reference.
Webhooks
Get pushed the outcome instead of polling for it.
Step 4: Verify the callback hash
When EximPe redirects to yourreturn_url, it POSTs the payment details as form data, signed with a hash. Verify that hash before you read anything else from the body.
Sample callback
The hash is an HMAC-SHA256 over exactly six fields, in this order, joined with
|, keyed by your encryption key:
return_url handler, then still confirm the order status from Step 3:
Step 5: Assert compliance
A collected payment sits in Action Required until you supply the compliance details its purpose code requires. Only then does it move to Under Review and become eligible for settlement abroad. For LRS payments this is the same flow used for virtual account collections: we tell you what the payment needs, you send it, and it completes itself once nothing is outstanding.LRS Verification
The step-by-step compliance flow, shared by every v3 collection method.
Security Notes
Create orders server-side
Your
X-Client-Secret must never reach the browser. Create the order from your backend and send only the session_id to the frontend.Verify before you deliver
Confirm
payment_successful from the Order Status API or the webhook. The redirect to your return_url proves nothing on its own.Pin the SDK
Load the SDK from a versioned URL with an
integrity attribute, so a changed file at the CDN cannot execute on your page.Keep secrets out of requests
Never put your encryption key, salt, or a plaintext hash string into a payment request or anything the browser can read.
Need Help?
Contact Support
📩 [email protected] — 24/7, response within 1 business day
API Reference
📚 Create Order, Get Order Status, and the v3 webhook payloads