API v1FiatPe Home
FiatPeDocs
SERVER 2 SERVER

S2S UPI Intent

Initiate a UPI Intent payment from your backend and launch the returned intent on the customer’s device.

Supported UPI capabilities

Fetch the UPI flows and payer account types enabled for your account using the Methods API.

Only present UPI Intent, UPI Collect, or a payer account type when the corresponding value returned by the API is true.

Open the Methods API guide
STEP 1

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.

Open the Create Order API reference

Server request example

Use your FiatPe credentials only from a trusted backend environment.

REQUEST

Curl
Copy
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.

200 OK
Copy
{
  "data": {
    "id": "order_2f40f08f4baa4e5b",
    "amount": 5000,
    "entity": "order",
    "method": null,
    "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."
}
STEP 2

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
Copy
curl --location 'https://api.fiatpe.com/v1/payments/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",
    "callback_url": "https://api.example.com/webhooks/fiatpe",
    "description": "Test payment",
    "method": "upi",
    "upi": {
      "flow": "intent",
      "expiry_time": 5
    },
    "metadata": {
      "note_key": "value1"
    }
  }'

Request fields

FieldRequiredDescription
amountYesPayment amount in the currency’s smallest sub-unit. For INR, 5000 represents ₹50.00.
currencyYesThree-letter currency code. Use INR for Indian Rupees.
contactYesCustomer phone number including the country code.
nameYesCustomer’s full name.
emailYesCustomer email address.
order_idYesOrder ID returned by the Create Order API.
callback_urlNoOptional HTTPS endpoint on your server where FiatPe sends asynchronous payment updates.
descriptionNoDescription associated with the payment.
methodYesSet to upi.
upi.flowYesSet to intent.
upi.expiry_timeYesExpiry value must be between 1 and 15 minutes for the UPI Intent payment request.
metadataNoMerchant-defined key-value data associated with the payment.

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.

200 OK
Copy
{
  "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.