Sawariya Pay brings secure, robust, and lightning-fast transaction pipelines to your own external website or test environments. Integrates smoothly using standard HTML, JavaScript, Node.js, and PHP scripts.
Follow these simple steps to integrate Sawariya Pay payment services directly into your own custom business website.
Sabse pehle Sawariya Pay par free account banayein aur login kijiye.
Go to Sign Up page and fill out your business profile. Inside your merchant dashboard, your personal Merchant ID (User UID) will be displayed on the top headers.
Apne Account ko activate karne ke liye KYC status verify karein.
In your sidebar, click on KYC Status. Submit your business name, PAN number, Aadhaar Details, and Bank account specification (for settling payments). Once approved, live payments are activated!
"API Keys & Devs" section se secure token generate karein.
Go to the API Keys & Devs tab in the merchant dashboard. Click on Generate New API Key. Copy your Client secret securely — you will use this key inside your authorization headers to secure server-to-server orders.
Apni website ka address domain list me add karein.
Inside the API Keys section, you will see Merchant API Allowed Domain. Enter your exact website URL (e.g., example.com or localhost:3000). Sawariya Pay will secure your token and automatically prevent unauthorized websites from spoofing your checkout.
Callback Webhook configure karke dynamic copy-paste integrate kijiye.
Set your custom Webhook Alert Endpoint. Use our Interactive Code Builder below to instantly generate pre-filled code customized specifically with your Merchant Key, amount and metadata, then paste it straight into your source code!
Apne custom values fill kijiye aur realtime me ready-to-use checkout script, PHP code aur API templates generate kijiye.
Paste this embed code inside your client-side website (e.g., index.html) to render the premium payment popup automatically.
Recommended (Best for Single-Page HTML/PHP Sites): Save this code as a single file, e.g., pay.php on your server. It embeds the pay button, hides your API credentials securely on the server, avoids CORS blocks, and handles signature verification all in one file!
Use this lightweight server-side PHP script inside your checkout callback (e.g. create-order.php) to initiate order tokenizations securely.
Securely create backend orders on a modern Node.js framework using Express.
All backend server-side requests must authorize operations using your custom Merchant API Keys. Authenticate requests by attaching the following header configuration:
Generate a unique checkout transaction order. Always execute order creation server-side to secure billing metrics.
POST /api/create-order.phpConfirm payment success securely by validating checkout signatures with Razorpay's cryptographic keys.
POST /api/verify-signature.phpDomain Whitelisting is an essential safety feature of Sawariya Pay. When configured, our API servers will refuse checkout request handshakes coming from unauthorized origins.
For active development, make sure to include localhost or 127.0.0.1. For production launch, update this in your Profile Settings to your custom domain such as example.com.
Instead of periodically polling payment states, configure webhooks to receive direct real-time notifications on your backend server script immediately after successful merchant payments.
Sawariya Pay triggers webhook events with the following JSON post parameters: