User creation

This method provides functionality of:

  • creating user

  • updating data of a previously created user when specifying the same clientId. The sent parameter values overwrite the previous data.

When depositing, a webhook, is sent to the user's personal address, to the depositWebhookUrl specified in the request. When withdrawing (the common method of "Make withdrawal" / make-withdrawal) from a personal address, a status of this withdrawal will be in response.

User creation

post
Header parameters
x-api-public-keystringOptional

Public API-key

x-api-signaturestringOptional

Signing the request body with a private API-key

Content-typestringOptional

Request content type

Example: application/json
Body

The body of the user creation request

clientIdstringRequired

User ID in the merchant system

Example: user12345
clientEmailstringOptional

User mail

Example: [email protected]
clientNamestringOptional

User name

Example: John Doe
depositWebhookUrlstringOptional

URL for notifications of new deposits

Example: https://merchant.domain/webhooks/user12345
createAddressesbooleanOptional

Create all addresses for the user

groupByBlockchainbooleanOptional

Group addresses by blockchain networks (for example, 1 address for bsc, fantom, ethereum networks). This parameter has an effect only when createAddresses: true

checkRisksbooleanOptional

Check risks for every incoming transaction to the user's personal addresses. Information about risks will be sent in the webhook to the specified depositWebhookUrl in the risks field

Responses
200Success
application/json
post
POST /api-gateway/personal-addresses/create-user HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 211

{
  "clientId": "user12345",
  "clientEmail": "[email protected]",
  "clientName": "John Doe",
  "depositWebhookUrl": "https://merchant.domain/webhooks/user12345",
  "createAddresses": true,
  "groupByBlockchain": true,
  "checkRisks": true
}
200Success
{
  "success": true,
  "response": {
    "id": "be4723bf-0bd0-4ff9-a59b-2c8425b08d2d",
    "clientId": "user12345",
    "clientEmail": "[email protected]",
    "clientName": "John Doe",
    "depositWebhookUrl": "https://merchant.domain/webhooks/user12345",
    "createdAt": "2025-06-09T13:18:11.534Z",
    "updatedAt": "2025-06-09T13:18:11.534Z",
    "addresses": {
      "id": "1b950d20-5c23-4323-b2b9-fb36d104e8f1",
      "userId": "4006fd41-0c97-49f7-8808-24c99d536c06",
      "currency": "USDT",
      "network": "ethereum",
      "address": "0x515b72ed8a97f42c568d6a143232775018f133c8",
      "tag": null,
      "balance": "1234.1234",
      "isActive": true
    }
  }
}

Last updated