S2S UPI Intent
Initiate a UPI Intent payment from your backend and launch the returned intent on the customer’s device.
Create the order on your server
Create a new FiatPe order for each payment attempt. Amounts use the smallest currency sub-unit: for INR, 5000 represents ₹50.00. Store the returned order ID against your internal order before using it in the S2S payment request.
Server request example
Use your FiatPe credentials only from a trusted backend environment.
REQUEST
curl --request POST \
--url https://api.fiatpe.com/v1/orders/ \
--header "Authorization: Basic YOUR_BASE64_CREDENTIALS" \
--header "Content-Type: application/json" \
--data '{
"amount": 5000,
"currency": "INR"
}'Response
Store the returned data.id and pass it as the order_id in Step 2.
{
"data": {
"id": "order_2f40f08f4baa4e5b",
"amount": 5000,
"entity": "order",
"status": "created",
"currency": "INR",
"metadata": {},
"created_at": 1788148983,
"return_url": null,
"amount_paid": 0,
"bank_details": null,
"return_method": "POST",
"amount_pending": 5000
},
"message": "order created successfully."
}Initiate a payment
Send this request from your backend. Generate the Basic authorization value by Base64 encoding api_key:secret_key. Theupi.flow value must be intent.
REQUEST
curl --location 'https://api.fiatpe.com/v1/payments/create/s2s/' \
--header 'Authorization: Basic <base64(api_key:secret_key)>' \
--header 'Content-Type: application/json' \
--data-raw '{
"amount": 5000,
"currency": "INR",
"contact": "+919898989898",
"name": "Aftab Hussain",
"email": "customer@example.com",
"order_id": "order_75db8a5703ba4d3a",
"return_url": "https://example.com/payment/return",
"description": "Test payment",
"method": "upi",
"upi": {
"flow": "intent",
"expiry_time": 5
},
"metadata": {
"note_key": "value1"
}
}'Request fields
Response
Open the returned link for the customer to continue the UPI Intent flow. Store the payment_id for status checks, webhook reconciliation, and support.
{
"link": "https://api.fiatpe.com/simulation/<token>/",
"payment_id": "FIATPESTO339JBX1411790703644"
}Handle the final result
- Opening the returned link does not prove that the payment succeeded.
- Confirm the final status from your backend after the customer returns.
- Process FiatPe webhook deliveries idempotently and allow delayed or duplicate events.
- Match the payment ID, order ID, amount, and currency before fulfilment.