Skip to main content
The FlexyPe Checkout API lets you create checkout sessions, authenticate customers with phone-based OTP, and drive the checkout flow end to end.

Base URL

All endpoints are served from:
https://api.flexype.in

Authentication

The public checkout endpoints are authenticated by merchant middleware, which identifies the merchant from the request (the shop_domain on session creation). You do not pass an API key on these endpoints. Customer authentication is handled separately through the OTP flow. After Verify OTP succeeds, you receive JWT tokens:
TokenDefault expirationRefresh
access_token1 hourUse the refresh token
refresh_token30 daysNot refreshable
Store them on the client under the keys flexy_access and flexy_refresh.

Checkout flow

1

Create a session

Call Create Session with the cart items. Save the returned session_id.
2

Send an OTP

Call Send OTP with the customer’s phone. Save the returned context_id.
3

Resend if needed

Call Resend OTP if the customer doesn’t receive the code.
4

Verify the OTP

Call Verify OTP with the code. Save the returned tokens and continue with payment.

Response format

Every response wraps its result in a consistent envelope.
{
  "status": "SUCCESS",
  "data": { }
}

Rate limits

OperationLimitWindow
Send / Resend OTP1 OTP per number30 seconds
Send / Resend OTP10 OTP per IP10 minutes
Verify OTP3 attemptsPer OTP
Create SessionNo limit