Create an Order
Create and store the payment order securely before opening Checkout.js.
Create the order on your server
Create a new FiatPe order for each checkout attempt. Amounts use the smallest currency sub-unit: for INR, 5000 represents ₹50.00. Store the returned order ID against your internal order before sending it to the browser.
Server request example
Use your FiatPe credentials only from a trusted backend environment.
cURL
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",
"method": "upi",
"return_url": "https://example.com/payment/return",
"return_method": "POST",
"callback_url": "https://api.example.com/webhooks/fiatpe"
}'Order checklist
- Calculate the amount on your server instead of trusting a browser value.
- Use a unique internal reference and prevent duplicate order creation.
- Validate the currency, partial-payment rules, and minimum amount.
- Use HTTPS return and callback URLs that belong to your application.
- Pass the exact returned
order_idto Checkout.js.