Effortless customer verification now available   View changelog
Sphere Paysphere
Onboarding

Send Verification Code

Sends an OTP code to a customer's contact information.

POST
/v2/customer/{customer_id}/otp-send
AuthorizationBearer <token>

JWT Bearer token authentication

In: header

Path Parameters

customer_idstring

The customer's unique ID generated by SpherePay upon customer creation.

Match^customer_[a-z0-9]+$
typestring

The type of verification to send. Available options are email and phone.

Value in"email" | "phone"

Response Body

curl -X POST "https://api.sandbox.spherepay.co/v2/customer/customer_1ab2c3d4/otp-send" \
  -H "Content-Type: application/json" \
  -d '{
    "type": "email"
  }'

{
  "type": "email",
  "contact": "johndoe123@gmail.com",
  "verified": false,
  "expiresAt": "2025-04-20T19:27:50.587Z"
}

{
  "ts": "2025-04-20T00:09:16.870Z",
  "error": {
    "information": [
      "Required"
    ]
  }
}

{
  "ts": "2025-04-20T00:09:16.870Z",
  "error": {
    "general": "{{information}} Not Found"
  }
}