TPI Pay
Seamless payment integration

Card Integration

Use the Seamless Card flow to create a backend-initiated payment request with payment_method set to CARD.

Overview

Send a POST request to /api/v1/pg/payments with payment_method set to CARD. The backend resolves the merchant’s configured gateway and method permissions, then returns the resulting payment response.

Copy-paste cURL

Use this exact request format in Postman or a terminal.

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-CARD-001", "description": "Seamless card 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": "CARD" }'

Card request fields

The Seamless Card flow uses the same request envelope as the generic Seamless payment request. The chosen gateway handles the actual card checkout experience.

POST: https://staging.login.tpipay.ai/api/v1/pg/payments

Request data

Headers

HeaderValueDescription
AuthorizationBearer <seamless_token>Seamless bearer token for the merchant and environment.
Content-Typeapplication/jsonSend the request body as JSON.
X-Seamless-Signatureoptional-hmac-signatureOptional request signature header using the merchant webhook secret.

Body

FieldTypeRequiredDescription
amountnumericYesAmount in rupees; minimum 0.01 and maximum 100000000.
currencystringNoMust be INR; defaults to INR.
customer_namestringYesCustomer name.
customer_phonestringYesCustomer mobile number.
customer_emailstringNoValid customer email.
transaction_idstringNoYour unique reference. If omitted, the app creates one automatically.
descriptionstringNoPayment description.
success_urlstringNoOptional success redirect URL.
failure_urlstringNoOptional failure redirect URL.
cancel_urlstringNoOptional cancel redirect URL.
webhook_urlstringNoOptional webhook URL for status updates.
gatewaystringNoOptional gateway override if you want to target a specific configured gateway.
idempotency_keystringNoOptional retry-safe key.
payment_methodstringYesMust be CARD 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-CARD-001",
  "description": "Seamless card 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": "CARD"
}
Success response