POST request to the initiate endpoint with your chosen payment method, a unique order identifier, and your customer’s details. bluSwap validates the request and returns the payment data you need to present the checkout experience — whether that’s a UPI intent URL, a QR code payload, or a redirect link to a hosted checkout page.
Headers
Every request to the initiate endpoint requires the following headers. The device and browser metadata you supply helps bluSwap route the payment correctly and filter out automated or bot activity.string
required
Your Merchant Secret Key. Authenticate every request with this key — do not expose it in client-side code.
string
required
The device and browser string for the customer’s current session. bluSwap uses this to determine which payment UI to render — for example, surfacing GPay prominently on Android devices.
string
required
A unique string that identifies the customer’s specific device. bluSwap uses this to detect bot activity and flag suspicious repeat transactions, ensuring that the person paying is a real human on a known device.
string
required
The channel from which the request originates. Pass
web for browser-based integrations, ios for Apple devices, or android for Android devices.Request Parameters
number
required
The transaction amount to collect from the customer.
string
required
The payment method for this collection. Accepted values are
INTENT, VPA, QR, CREDIT_CARD, DEBIT_CARD, and NET_BANKING.string
required
Your unique internal transaction ID. Use this identifier to track the payment and query its status. You must generate a new
order_id for every transaction.object
required
An object containing the customer’s identity details. Include the following fields:
name— the customer’s full nameemail— the customer’s email addressphone— the customer’s phone numberphone_country_code— the country dialling code (e.g.,+91)
string
Required when
payment_mode is INTENT. The operating system of the customer’s device. Pass ANDROID for Android devices or IOS for Apple devices.string
Required when
payment_mode is INTENT. The UPI app you want to open on the customer’s device. Accepted values are PHONEPE, GPAY, PAYTM, CRED, BHIM, and AMAZON.string
Required when
payment_mode is VPA. The customer’s Virtual Payment Address (e.g., user@upi). bluSwap sends a collect request to this UPI ID, and the customer approves it in their UPI app.Collection Methods
Select the payment method that best fits your integration. Each method has its own sample request, response, and redirection behavior — see the dedicated sub-pages below.UPI Intent
Opens the customer’s selected UPI app directly on their Android or iOS device.
UPI QR
Returns a QR code payload that customers scan with any UPI app to complete payment.
UPI VPA
Sends a collect request to the customer’s UPI ID for approval in their UPI app.
Credit Card
Returns a hosted checkout URL — redirect the customer there to enter card details.
Debit Card
Returns a hosted checkout URL — redirect the customer there to enter card details.
Net Banking
Returns a hosted checkout URL — redirect the customer there to select their bank.
