UPI
This page describes how to submit an India UPI payment with a vault token.
For India UPI vault payments, merchants need to create a UPI vault token first, and then submit the Payin request with the returned vault token. The customer needs to visit the pay_url returned in the Payin response to authorize the payment.
Step 1: Create a UPI Vault Token
Create a UPI vault token for the customer.
Endpoint
POST https://gateway-test.pagsmile.com/vault/create
Request Body
app_id
string
Yes
Max 32 chars.
The merchant application ID assigned by Pagsmile.
timestamp
string
Yes
Format: yyyy-MM-dd HH:mm:ss. Max 19 chars.
Request timestamp.
version
string
Yes
Fixed value: 2.0.
API version.
type
string
Yes
Fixed value: UPI.
Payment type.
upi.region
string
Yes
Fixed value: IND.
UPI region.
upi.method
string
Yes
Fixed value: UPI.
UPI payment method.
upi.uid
string
Yes
Merchant-generated user ID.
The unique user ID generated by the merchant.
upi.plan.internal
string
Yes
One of: 1W, 1M, 3M, 6M, 1Y.
Billing cycle.
upi.plan.start_date
string
Yes
Format: yyyy-MM-dd.
The start date of the UPI vault plan.
upi.plan.end_date
string
Yes
Format: yyyy-MM-dd.
The end date of the UPI vault plan.
upi.plan.minimum_amount
number
Yes
-
Minimum payment amount allowed for the plan.
upi.plan.maximum_amount
number
Yes
-
Maximum payment amount allowed for the plan.
Request Sample
Response
Step 2: Submit Payin with Vault Token
Use the vault token returned from Step 1 to submit the India UPI Payin request.
Endpoint
POST https://gateway-test.pagsmile.com/trade/pay
Request Body
app_id
string
Optional
Max 32 chars.
The merchant application ID assigned by Pagsmile.
timestamp
string
Optional
Format: yyyy-MM-dd HH:mm:ss. Max 19 chars.
Request timestamp.
method
string
Optional
Fixed value: UPI.
Payment method.
version
string
Optional
Fixed value: 2.0.
API version.
order_amount
decimal
Optional
Range: 1–500000. Supports up to 2 decimal places.
The order amount.
order_currency
string
Optional
Fixed value: INR.
Order currency.
out_trade_no
string
Optional
Max 64 chars.
The unique order number generated by the merchant.
subject
string
Optional
Max 128 chars.
The order subject.
notify_url
string
Optional
Valid URL.
The URL used to receive asynchronous payment notifications.
return_url
string
Optional
Valid URL.
The URL to redirect the customer after payment.
buyer_id
string
Optional
Merchant-generated user ID.
The unique customer ID generated by the merchant.
vault_token
string
Optional
Returned from Create Vault.
The UPI vault token returned from Step 1.
customer.name
string
Required
-
Customer's name.
customer.email
string
Required
Valid email address.
Customer's email address.
customer.phone
string
Required
-
Customer's phone number.
address.zip_code
string
Required
-
Customer's ZIP/postal code.
Request Sample
Response
The customer needs to visit the returned pay_url to authorize the payment.
Refund
Refund is supported for this payment method.
Last updated