Seamless payment integration
UPI Integration
Use the Seamless UPI flow to create a payment request directly from your backend with a bearer token.
Overview
Send a POST request to /api/v1/pg/payments with payment_method set to UPI. The same merchant settings, gateway resolution, and payment creation logic are reused from the existing merchant payment flow.
Copy-paste cURL
Use this exact request format in Postman or a terminal. It includes the required bearer token and optional signature header.
curl --location --request POST 'https://staging.login.tpipay.ai/api/v1/pg/payments' \
--header 'Authorization: Bearer ' \
--header 'Content-Type: application/json' \
--header 'X-Seamless-Signature: ' \
--data '{
"amount": 1500.00,
"currency": "INR",
"customer_name": "Raj Sharma",
"customer_phone": "9876543210",
"customer_email": "raj@example.com",
"transaction_id": "ORD-SEAMLESS-UPI-001",
"description": "Seamless UPI payment",
"success_url": "https://yourdomain.com/payment/success",
"failure_url": "https://yourdomain.com/payment/failure",
"cancel_url": "https://yourdomain.com/payment/cancel",
"webhook_url": "https://yourdomain.com/webhook",
"payment_method": "UPI"
}'
UPI request fields
All Seamless requests use the same payment fields as the existing merchant payment API. The main difference is that you authenticate with a Seamless bearer token.
POST: https://staging.login.tpipay.ai/api/v1/pg/payments
Request data
Headers
| Header | Value | Description |
|---|---|---|
Authorization | Bearer <seamless_token> | Seamless bearer token returned by the token endpoint. |
Content-Type | application/json | Send the request body as JSON. |
X-Seamless-Signature | optional-hmac-signature | Optional request signature header using your merchant webhook secret. |
Body
| Field | Type | Required | Description |
|---|---|---|---|
amount | numeric | Yes | Amount in rupees; minimum 0.01 and maximum 100000000. |
currency | string | No | Must be INR; defaults to INR. |
customer_name | string | Yes | Customer name. |
customer_phone | string | Yes | Customer mobile number. |
customer_email | string | No | Valid customer email. |
transaction_id | string | No | Your unique reference. If omitted, the app creates one automatically. |
description | string | No | Payment description. |
success_url | string | No | Optional success redirect URL. |
failure_url | string | No | Optional failure redirect URL. |
cancel_url | string | No | Optional cancel redirect URL. |
webhook_url | string | No | Optional webhook URL for status updates. |
gateway | string | No | Optional gateway override if you want to target a specific configured gateway. |
idempotency_key | string | No | Optional retry-safe key. |
payment_method | string | Yes | Must be UPI for this integration. |
Example request
{
"amount": 1500.00,
"currency": "INR",
"customer_name": "Raj Sharma",
"customer_phone": "9876543210",
"customer_email": "raj@example.com",
"transaction_id": "ORD-SEAMLESS-UPI-001",
"description": "Seamless UPI payment",
"success_url": "https://yourdomain.com/payment/success",
"failure_url": "https://yourdomain.com/payment/failure",
"cancel_url": "https://yourdomain.com/payment/cancel",
"webhook_url": "https://yourdomain.com/webhook",
"payment_method": "UPI"
}
Success response
