Skip to main content
POST
/
v2
/
public
/
checkout
/
otp
/
send
Send OTP
curl --request POST \
  --url https://api.flexype.io/v2/public/checkout/otp/send \
  --header 'Content-Type: application/json' \
  --data '
{
  "phone": "9876543210",
  "dial_code": "91",
  "merchant_id": "4b4c8bf8-5a7c-4786-9210-418c8bc5c379",
  "session_id": "5223aec7-bb78-4344-be18-8023eb8f22ae"
}
'
{
  "status": "SUCCESS",
  "data": {
    "context_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
This is the first step in the OTP-based login flow. Delivery is via SMS or WhatsApp based on merchant configuration.
Save the returned context_id on the client — it’s required for Resend OTP and Verify OTP. The OTP is valid for 10 minutes. Send the phone number without the country code prefix (e.g. 9876543210, not +919876543210).

Body

application/json
phone
string
required

National number without country code prefix (e.g. '9876543210', not '+919876543210').

Example:

"9876543210"

dial_code
string
required

Dial code, e.g. '91' for India. Validated against the country codes database.

Example:

"91"

merchant_id
string<uuid>
required

Merchant UUID.

Example:

"4b4c8bf8-5a7c-4786-9210-418c8bc5c379"

session_id
string<uuid>
required

Checkout session UUID from Create Session.

Example:

"5223aec7-bb78-4344-be18-8023eb8f22ae"

Response

OTP sent successfully.

status
string
Example:

"SUCCESS"

data
object