View Categories

Send Phone verification code

< 1 min read

Send Phone Verification Code #

Sends a one-time SMS code to the user so they can confirm ownership of their phone number.

Endpoint #

POST https://api-test.10npay.com/User/phone-number/send-code

Headers #

  • Authorization: Bearer <access_token>
  • Content-Type: application/json

Request Body #

{
  "id": 2077,
  "phoneNumber": "+359881234567",
  "correlationType": 0
}
Field Type Description
id integer (int32) User identifier returned by POST /User. Required.
phoneNumber string Phone number in E.164 format (+[country][number]). Required.
correlationType integer (enum) Optional — 0 for standard individual users (default), 1 for merchant flows.

Responses #

  • 204 No Content — SMS dispatched (or the user is already verified, in which case the call is still idempotent).
  • 400 Bad Request — invalid format or phone already registered.
  • 401 Unauthorized — missing/expired Bearer token.
  • 404 Not Found — unknown userId.
  • 5xx Server Error — transient failure (retry with backoff).

Notes #

  • Apply local validation and throttling (e.g., minimum delay between resend attempts).
  • The server enforces uniqueness: if the phone is already linked to another user, the call returns 400.
  • After the code is sent, prompt the user to call POST /User/phone-number/verify with the received digits.