Effortless customer verification now available   View changelog
Sphere Paysphere
Onboarding

Verify Verification Code

Verifies otp code for customer's contact information.

POST
/v2/customer/{customer_id}/otp-verify
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 that was verified.

Value in"email" | "phone"
codestring

The otp code to be verified.

Response Body

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

{
  "type": "email",
  "contact": "johndoe123@gmail.com",
  "verified": true,
  "verifiedAt": "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"
  }
}