Introduction #
This documentation provides details on how to create a user in the 10nPay merchant system. Before making requests to create a user, you need to authenticate and obtain an authorization token. This guide will cover the necessary steps to generate the token and create a user.
Authentication #
The Endpoint you can found here
URL: https://developers.10npay.com/docs/merchant-authentication/#11-toc-title
Description
To create an auth token, follow the instructions at the provided URL. This token will be used to authenticate subsequent requests to the API.
Endpoint #
URL:
https://auth-test.10npay.com/api/v1/User
Method: POST
Request Headers
- accept: text/plain
- Authorization:
Bearer {Token}
- Content-Type:
application/json-patch+json
Request Parameters #
Parameter | Type | Description |
---|---|---|
merchantId | integer | ID of the merchant |
string | Email address of the new user |
Example Request Payload
{
"merchantId": 10,
"email": "email@calunia.com"
}
Example Response #
{
"id": 1330
}
CURL Example
curl -X POST "https://auth-test.10npay.com/api/v1/User" \
-H "accept: text/plain" \
-H "Authorization: Bearer {Token}" \
-H "Content-Type: application/json-patch+json" \
-d "{\"merchantId\":126,\"email\":\"linoma3480@calunia.com\"}"
Responses #
Success #
- Status Code:
201
- Description: User created successfully.
- Response Schema:
{
"id": 1330
}
Field | Type | Description |
---|---|---|
id | integer | The ID of the created user. |
Error: Bad Request #
- Status Code:
400
- Description: Bad request.
- Response Schema:
{
"errorCode": 400,
"errorMessage": "Bad Request"
}
Field | Type | Description |
---|---|---|
errorCode | integer | The error code. |
errorMessage | string | A message describing the error. |
Error: Server Error #
- Status Code:
500
- Description: Internal server error.
- Response Schema:
{
"errorCode": 500,
"errorMessage": "Server Error"
}
Field | Type | Description |
---|---|---|
errorCode | integer | The error code. |
errorMessage | string | A message describing the error. |