Payments

On this page:

THE PAYMENT OBJECT

A detailed description of the JSON object

GET[base]/payments

Get a payments list

GET[base]/payments/{paymentId}

Get payment details


The Payment object

This object provides the following data about a reward payment:

paymentId string

The identifier of a reward payment.

paymentState string

The current state of a reward payment. Possible values:

  • pending — the reward was calculated, but not yet credited to the partner’s account

  • cancelled — the reward was cancelled and debited from the partner’s account

  • done — the reward was successfully credited to the partner’s account

paymentAmount string

The reward amount.

paymentCurrencyCode string

The reward currency.

paymentCurrencyPrecision integer

The minor unit of a reward payment currency (the number of digits after the decimal separator).

paymentFormulaUnitPrecision integer

The minor unit of a currency set in the payment plan (the number of digits after the decimal separator).

paymentPreferencesGroupId string

The identifier of a payment plan.

paymentPreferencesGroupName string

The name of a payment plan.

paymentFormula string

The payment plan. Possible values:

paymentFormulaId string

The identifier of a payment plan.

paymentFormulaPosition string

The position state as set in the payment plan. Possible values:

  • open

  • closed

paymentFormulaSide string

The trade side as set in the payment plan. Possible values:

  • buy

  • sell

paymentFormulaRatio string

The multiplier that has been used for reward calculation according to a payment plan.

paymentFormulaUnit string

The alphabetic code of a currency in which the reward was calculated.

paymentLevel integer

The client level.

paymentLevelId string

The identifier of a client level.

paymentLevelRatio string

The multiplier that has been used for reward calculation according to a client level.

paymentMaster boolean

If true, the partner is assigned the Master status.

paymentMasterId string

The identifier of a Master partner.

paymentMasterRatio string

The multiplier that has been used for reward calculation according to a Master status.

paymentTierId string

The tier identifier.

paymentTierName string

The tier name.

paymentTierInterval integer

The number of days during which the clients must meet the objectives defined for a corresponding tier (such as the number of active traders, or the traded volume, or both).

paymentTierStartTime string

The date and time of a tier period start.

paymentTierEndTime string

The date and time of a tier period end.

paymentTierUsers integer

The number of new active traders that a partner has attracted during the tierPeriod (refer to the IB type object) to meet the objectives defined for a tier.

paymentTierVolume string

The volume that clients attracted by a partner have traded during the tierPeriod (refer to the IB type object) to meet the objectives defined for a tier.

paymentTierRatio string

The multiplier that has been used for reward calculation according to a tier.

paymentGroupId string

The identifier of a partnership program.

paymentGroupName string

The name of a partnership program.

paymentProfileId string

The identifier of a partner profile.

paymentUserId string

The identifier of a partner.

paymentUserEmail string

The email of a partner.

paymentUserFirstName string

The first name of a partner.

paymentUserLastName string

The last name of a partner.

paymentUserMiddleName string

The middle name of a partner.

paymentUserRatio string

The multiplier that has been used for reward calculation according to personal settings of a partner.

paymentUserUuid string

The universally unique identifier of a partner (if provided). Refer to Integrations for more information.

paymentWalletId string

The identifier of a partner wallet.

paymentWalletNumber string

The number of a partner wallet.

paymentWalletUuid string

The universally unique identifier of a partner’s wallet (if provided). Refer to Integrations for more information.

paymentError string

The description of an error occurred during the reward payment processing (if any).

paymentComment string

The commentary to a reward payment.

tradePlatformId string

The identifier of a trading platform.

tradePlatformAddress string

The address of a trading platform.

tradePlatformName string

The name of a trading platform.

tradePlatformProvider string

The connection provider of a trading platform.

tradePlatformGroupId string

The identifier of a platform group.

tradePlatformGroupName string

The name of a platform group.

tradeAccountId string

The identifier of a client’s trade account.

tradeAccountIdentifier string

The identifier of a client’s trade account on a trading platform.

tradeAccountType integer

The account type. Possible values:

  • 0 — default

  • 1 — payment

  • 2 — investment

  • 3 — master

  • 4 — B2Copy investment

  • 5 — B2Copy master

  • 6 — PAMM investment

  • 7 — PAMM master

  • 8 — MAM investment

  • 9 — MAM master

tradeProfileId string

The identifier of a client profile.

tradeProfileUuid string

The universally unique identifier of a partner profile (if provided). Refer to Integrations for more information.

tradeUserId string

The identifier of a client.

tradeUserEmail string

The email of a client.

tradeUserFirstName string

The first name of a client.

tradeUserLastName string

The last name of a client.

tradeUserMiddleName string

The middle name of a client.

tradeId string

The identifier of a trade.

tradeIdentifier string

The identifier of a trade on a trading platform.

tradeEnvironment string

The working environment. Possible values:

  • production

  • demo

tradePosition string

The position state as a result of the executed trade. Possible values:

  • open

  • closed

tradeSide string

The trade side. Possible values:

  • buy

  • sell

tradeSymbolId string

The symbol identifier.

tradeSymbolPath string

The hierarchical symbol path: platform group\\symbol group\\symbol name

tradeSymbolName string

The symbol name.

tradeSymbolBaseCurrencyCode string

The alphabetic code of a base currency.

tradeSymbolQuoteCurrencyCode string

The alphabetic code of a quote currency.

tradeCommissionAmount string

The commission amount paid for the executed trade.

tradeCommissionCurrencyCode string

The alphabetic code of a currency in which the commission was paid.

tradeSwapAmount string

The swap amount.

tradeSwapCurrencyCode string

The alphabetic code of a swap currency.

tradeProfitAmount string

The trade profit amount.

tradeProfitCurrencyCode string

The alphabetic code of a profit currency.

tradePnlAmount string

The profit-loss amount.

tradePnlCurrencyCode string

The alphabetic code of a profit-loss currency.

tradePrice string

The trade execution price.

tradeVolume string

The trade volume.

tradeTime string

The date and time when the trade was executed.

creditTransactionId string

The identifier of a credit transaction.

creditTransactionIdentifier string

The identifier of a credit transaction on a trading platform.

creditTransactionAmount string

The amount of a credit transaction.

creditTransactionRate string

The currency rate of a credit transaction.

creditTransactionCurrencyCode string

The alphabetic currency code of a credit transaction.

creditTransactionCurrencyPrecision integer

The minor unit of a credit transaction currency (the number of digits after the decimal separator).

debitTransactionId string

The identifier of a debit transaction.

debitTransactionIdentifier string

The identifier of a debit transaction on a trading platform.

debitTransactionAmount string

The amount of a debit transaction.

debitTransactionRate string

The currency rate of a debit transaction.

debitTransactionCurrencyCode string

The alphabetic currency code of a debit transaction.

debitTransactionCurrencyPrecision string

The minor unit of a credit transaction currency (the number of digits after the decimal separator).

createTime string

The date and time when the object has been created.

updateTime string

The date and time when the object has been last updated.

THE PAYMENT OBJECT
{
  "paymentId": "6006dda272f002519c3eb505",
  "paymentState": "done",
  "paymentAmount": "2.14285602",
  "paymentCurrencyCode": "BTC",
  "paymentCurrencyPrecision": 8,
  "paymentFormulaUnitPrecision": 8,
  "paymentParentId": "6006dda272f002519c3eb505",
  "paymentPreferencesGroupId": "6006dda272f002519c3eb505",
  "paymentPreferencesGroupName": "Standard",
  "paymentFormula": "max_amount",
  "paymentFormulaId": "6006dda272f002519c3eb505",
  "paymentFormulaPosition": "elit consequat exercitation et",
  "paymentFormulaSide": "buy",
  "paymentFormulaRatio": "0.220000000000000000",
  "paymentFormulaUnit": "BTC",
  "paymentLevel": 1,
  "paymentLevelId": "6006dda272f002519c3eb505",
  "paymentLevelRatio": "1.000000000000000000",
  "paymentMaster": true,
  "paymentMasterId": "6006dda272f002519c3eb505",
  "paymentMasterRatio": "0.000000000000000000",
  "paymentTierId": "6006dda272f002519c3eb505",
  "paymentTierName": "Tier 1",
  "paymentTierInterval": 1,
  "paymentTierStartTime": "2021-01-01T00:00:00+00:00",
  "paymentTierEndTime": "2021-01-01T00:00:00+00:00",
  "paymentTierUsers": 1,
  "paymentTierVolume": "8.960000000000000000",
  "paymentTierRatio": "2.000000000000000000",
  "paymentGroupId": "6006dda272f002519c3eb505",
  "paymentGroupName": "Standard",
  "paymentProfileId": "6006dda272f002519c3eb505",
  "paymentUserId": "6006dda272f002519c3eb505",
  "paymentUserEmail": "a31b1402@privaterelay.appleid.com",
  "paymentUserFirstName": "Mary",
  "paymentUserLastName": "Smith",
  "paymentUserMiddleName": "Jane",
  "paymentUserRatio": "1.000000000000000000",
  "paymentUserUuid": null,
  "paymentWalletId": "6006dda272f002519c3eb505",
  "paymentWalletNumber": "12345",
  "paymentWalletUuid": null,
  "paymentError": null,
  "paymentComment": null,
  "tradePlatformId": "6006dda272f002519c3eb505",
  "tradePlatformAddress": "5.9.30.186:4443",
  "tradePlatformName": "MetaTrader 5",
  "tradePlatformProvider": "metatrader5",
  "tradePlatformGroupId": "6006dda272f002519c3eb505",
  "tradePlatformGroupName": "B2BUSD",
  "tradeAccountId": "6006dda272f002519c3eb505",
  "tradeAccountIdentifier": "12345",
  "tradeAccountType": 2,
  "tradeProfileId": "6006dda272f002519c3eb505",
  "tradeProfileUuid": null,
  "tradeUserId": "6006dda272f002519c3eb505",
  "tradeUserEmail": "a31b1402@privaterelay.appleid.com",
  "tradeUserFirstName": "Mary",
  "tradeUserLastName": "Smith",
  "tradeUserMiddleName": "Jane",
  "tradeId": "6006dda272f002519c3eb505",
  "tradeIdentifier": "12345",
  "tradeEnvironment": "production",
  "tradePosition": "open",
  "tradeSide": "exercitation mollit ex",
  "tradeSymbolId": "6006dda272f002519c3eb505",
  "tradeSymbolPath": "B2BUSD\\Shares\\AAPL",
  "tradeSymbolName": "AAPL",
  "tradeSymbolBaseCurrencyCode": "BTC",
  "tradeSymbolQuoteCurrencyCode": "BTC",
  "tradeCommissionAmount": "-2.620000000000000000",
  "tradeCommissionCurrencyCode": "BTC",
  "tradeSwapAmount": "2.14285602",
  "tradeSwapCurrencyCode": "BTC",
  "tradeProfitAmount": "2.14285602",
  "tradeProfitCurrencyCode": "BTC",
  "tradePnlAmount": "2.14285602",
  "tradePnlCurrencyCode": "BTC",
  "tradePrice": "2.14285602",
  "tradeVolume": "2.14285602",
  "tradeTime": "2021-01-01T00:00:00+00:00",
  "creditTransactionId": "6006dda272f002519c3eb505",
  "creditTransactionIdentifier": "12345",
  "creditTransactionAmount": "2.14285602",
  "creditTransactionRate": "1.000000000000000000",
  "creditTransactionCurrencyCode": "BTC",
  "creditTransactionCurrencyPrecision": 8,
  "debitTransactionId": null,
  "debitTransactionIdentifier": null,
  "debitTransactionAmount": null,
  "debitTransactionRate": null,
  "debitTransactionCurrencyCode": null,
  "debitTransactionCurrencyPrecision": null,
  "createTime": "2021-01-01T00:00:00+00:00",
  "updateTime": "2021-01-01T00:00:00+00:00"
}

Get a payments list

Use this method to obtain a list of reward payments.

To obtain detailed information about a specified reward payment, use a separate method to get payment details.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Query parameters:

This method supports pagination, sorting, and filtering. For details on applying the parameters, refer to the Query parameters section. Possible parameters for filtering and sorting are listed below. For values description, refer to the Payment object.

Possible values for the filter parameter:

  • paymentStartTime

  • paymentEndTime

  • paymentLevel

  • paymentGroupId

  • paymentState

  • paymentUserId

  • paymentWalletId

  • tradeEndTime

  • tradeIdentifier

  • tradeAccountIdentifier

  • tradeAccountType

  • tradeSymbolName

  • tradeStartTime

  • paymentMaster

  • transactionId

  • transactionIdentifier

Possible values for the sort_by parameter:

  • paymentId

  • paymentLevel

  • paymentMaster

  • paymentState

  • createTime

  • tradeIdentifier

  • tradeAccountIdentifier

  • tradeTime

  • updateTime

GET[base]/payments

curl --location -g --request GET 'https://your.base-url.here/payments?limit=10&offset=0&sort_by=createTime&sort_order=desc&filter[paymentStartTime]=2021-01-01T00:00:00+00:00&filter[paymentEndTime]=2021-01-31T23:59:59+00:00&filter[paymentLevel]=2&filter[paymentGroupId]=6006dda272f002519c3eb505&filter[paymentState]=2&filter[paymentUserId]=6006dda272f002519c3eb505&filter[paymentWalletId]=6006dda272f002519c3eb505&filter[tradeEndTime]=2021-01-31T23:59:59+00:00&filter[tradeIdentifier]=12345&filter[tradeAccountIdentifier]=12345&tradeAccountType=2&filter[tradeSymbolName]=BTCUSD&filter[tradeStartTime]=2021-01-01T00:00:00+00:00&filter[paymentMaster]=1&filter[transactionId]=6006dda272f002519c3eb505&filter[transactionIdentifier]=12345' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains an array of Payment objects providing information about all reward payments that correspond to the query parameters specified in the request.


Get payment details

Use this method to obtain detailed information about a specified reward payment.

To obtain a list of reward payments, use a separate method to get a list of payments.

Request

Header parameters:

  • Authorization: Bearer <access_token>

Path parameters:

paymentId required

The identifier of a reward payment.

GET[base]v1/payments/{paymentId}

curl --location --request GET 'https://your.base-url.here/payments/60ba407d15951453e60e49f8' \
--header 'Authorization: Bearer <token>'

Response

Body:

In case of success, the response body contains a Payment object providing information about the specified reward payment.