Create/update individual tariff
The method allows you to create or update an individual tariff.
If a tariff already exists for this userId
and action
, then the rest of the specified data will overwrite this tariff
Request:
The response contains an array of tariff objects:
Parameter
Type
Description
userId
String
User ID
action
String
Tariff action
amount
String
The commission percentage of the transaction amount (for example, 0.01 means a commission of 1% of the transaction amount)
minAmount
String or null
The minimum commission for charging (for example, when performing an operation, 1% of the transaction amount will be charged, but not less than minAmount
)
null
- without limits
maxAmount
String or null
The maximum commission for charging (for example, when performing an operation, 1% of the transaction amount will be charged, but no more than maxAmount
)
null
- without limits
comment
String or null
Comment/note for tariff
Parameter action
can take the following values:
Tariff
Description
INTERNAL_TRANSFER
Internal transfer
ORDER_DEPOSIT
Accepting payments for order
WALLET_DEPOSIT
Deposit to wallet
WALLET_WITHDRAWAL
Withdrawal from wallet
PAYOUT_DEPOSIT
Deposit to payout balance
PAYOUT_WITHDRAWAL
Withdrawal from payout balance
PERSONAL_DEPOSIT
Deposit to personal address
PERSONAL_WITHDRAWAL
Withdrawal from personal address
COLLECT_WITHDRAWAL
Withdrawal from collect address
RECURRENT_DEPOSIT
Deposit to recurrent address (by periodical subscription)
RECURRENT_WITHDRAWAL
Withdrawal from recurrent address
BRIDGE_INTERNAL
Blockchain bridge (change network)
BRIDGE_EXTERNAL
Blockchain bridge via API
EXCHANGE_INTERNAL
Exchange
EXCHANGE_AUTO
Exchange via API
Public API-key
Signing the request body with a private API-key
Request content type
application/json
The body of the request to create an individual tariff
User ID
ed83d19f-30ef-4b3f-bca9-edd2c7714b16
Organization ID
a61799b2-cd0c-47fd-a7f0-216b2be184c7
Target action on the tariff
EXCHANGE_AUTO
Possible values: The commission percentage of the transaction amount (for example, 0.01 means a commission of 1% of the transaction amount)
0.03
Type of fare amount
PERCENT
Possible values: Tariff Comment
tariff for John
Minimum commission for debiting (for example, when performing an operation, 1% of the transaction amount will be debited, but not less than MinAmount)
null - no restrictions
0.1
The maximum commission for debiting (for example, when performing an operation, 1% of the transaction amount will be debited, but no more than MaxAmount)
null - no restrictions
3000
POST /partner/api/set-organization-tariff HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 228
{
"userId": "ed83d19f-30ef-4b3f-bca9-edd2c7714b16",
"organizationId": "a61799b2-cd0c-47fd-a7f0-216b2be184c7",
"action": "EXCHANGE_AUTO",
"amount": "0.03",
"type": "PERCENT",
"comment": "tariff for John",
"minAmount": "0.1",
"maxAmount": "3000"
}
{
"success": true,
"response": null
}
Last updated