View Categories

Confirm email

Email Verification – Confirm User Email #

This step is the second stage of the registration flow. Once a new user has been created via the POST /User endpoint, the system automatically sends an email to the registered address. That email contains a six-digit security code. The purpose of this endpoint is to confirm that the email truly belongs to the user by validating the security code.

Verifying the email is mandatory before the user can continue with the setup of their 10n Payments account.


Endpoint #

POST https://api-test.10npay.com/User/email/confirm

Authentication #

This endpoint requires authorization. You must include a valid token in the request header:

Authorization: Bearer YOUR_SECRET_TOKEN

Request Body #

The body of the request must be in JSON format and include the following fields:

{
    "id": 123,
    "token": "475013",
    "correlationType": 0
}

Parameters #

  • id
    Type: integer (int32)
    Required: Yes
    Description: The unique userId returned from the /User endpoint. Must be greater than or equal to 1.

  • token
    Type: string
    Required: Yes
    Description: The six-digit code received by the user in their verification email. This field cannot be empty.

  • correlationType
    Type: integer (int32 enum)
    Required: Optional
    Allowed values: 0 or 1
    Description: Defines the correlation method. In most cases, this can remain 0.


Successful Response #

  • 200 OK
    The email was successfully verified.
    The user can now continue with the registration process.


Error Responses #

  • 400 Bad Request – Invalid Token
    Returned when the provided token is incorrect.

{
    "errors": {
        "Error": [
            "Invalid token."
        ]
    },
    "status": 400,
    "title": "Bad Request"
}

  • 400 Bad Request – Token Missing
    Returned when the token field is empty.

    {
        "errors": {
            "Token": [
                "The Token field is required."
            ]
        },
        "status": 400,
        "title": "One or more validation errors occurred."
    }

  • 400 Bad Request – Invalid User
    Returned when the supplied userId does not exist or is invalid.

    {
        "errors": {
            "Error": [
                "Invalid user."
            ]
        },
        "status": 400,
        "title": "Bad Request"
    }

  • 500 Server Error
    Indicates a server-side problem. Retry later or contact support.


Notes #

  • The userId and token must always match. Using an invalid combination will result in an error.

  • The six-digit code is generated uniquely for each registration attempt. If the user requests a new code, only the most recent one will be valid.

  • Email verification is a required step in order to activate the user account. Without a successful call to this endpoint, the account remains in an unverified state.

Powered by BetterDocs