Register a client and create their payment account (only for a standalone solution)

After using the method for seamless authorization and getting a URL that includes the token for accessing the B2COPY Web UI, register a client in a standalone B2COPY solution as follows:

  1. Initialize the wizard using the following method:

GET [host]/api/v1/standalone/auth/init

  1. Register the client using the following method:

POST [host]/api/v1/wizards/{uuid}

Upon registration in a standalone solution, a payment account is created for the client.

Step 1. Initialize the wizard

Use the method:

GET [host]/api/v1/standalone/auth/init

Request

curl --location --request GET 'https://host.name/api/v1/standalone/auth/init'

Response

The response includes the universally unique identifier (UUID) that is required for the next step.

Response example

{
  "status": 200,
  "meta": {
      "behaviours": [],
      "status": 200
  },
  "data": {
       "uuid": "92fae932-4cff-4d5f-9af9-a8bd71d1acc2",
       "type": "form",
       "workflow": "side_login",
       "status": 0,
       "done": false,
       "canceled": false,
       "rules": {}
  }
}

Step 2. Register the client and create their payment account

Use the method:

POST [host]/api/v1/wizards/{uuid}

Request

Path Parameters

Name
Required
Description

uuid

Yes

The universally unique identifier (UUID) obtained at Step 1.

Body Parameters

Name
Type
Required
Description

side_login

string

Yes

The MT login (number) of a client account.

token

string

Yes

The token obtained after using the method for seamless authorization.

investment_platform_id

string

Yes

The identifier of the investment platform instance.

  • If only one MT server is connected to your B2COPY investment platform, specify 1.

  • If you have more than one MT server connected to your B2COPY investment platform, contact the Support team for assistance.

device_fingerprint

string

Yes

The string that uniquely identifies a client device.

Request example

curl --location --request POST 'https://host.name/api/v1/wizards/92fae932-4cff-4d5f-4d5f-9af9-a8bd71d1acc2' \
--data-raw '{
  "side_login": "2121882153",
  "token": "8c3d46c32fff792caf33b9dee1694f1e",
  "investment_platform_id": "1",
  "device_fingerprint": "eyJjYW52YXNfY29kZSI6ImRhdGE6aW1hZ2UvcG5nO2Jhc2U2NCxpVkJPUncwS0dnb0FBQUFOU1VoRVVnQUFBUEFBQUFDTUNBWUFBQUJDdFNRb0FBQUFBWE5TUjBJQXJzNGM2UUFBSUFCSlJFRlVlRjd0blFtY0ZOVzEvNzkzRnNBQkFRVlpGRUZCaUNZcVNoSTB4RDBtN2x1TW1oZVg0QVpHbjJSNU1lYk"
}'

Response

The response includes the object providing information about the client registered in a standalone B2COPY solution, including the client ID, as well as information about the payment account created for that client on the platform.

After registering and obtaining the client ID, you can create master and investment accounts for that client (for details, refer to Create a master or investment account using the existing MT account).

Last updated