Replenishment of the user's advance balance
The method allows you to top up the user's advance balance (check the availability of the method in support)
Request:
Parameter
Required
Type
Description
userId
Yes
String
User ID
advancedBalanceId
Yes
String
Advanced balance ID
amount
Yes
String
The amount of replenishment. The number must contain no more than two decimal places (i.e. '5.25' is suitable, but '5.529' is not)
Header parameters
x-api-public-keystringOptional
Public API-key
x-api-signaturestringOptional
Signing the request body with a private API-key
Content-typestringOptionalExample:
Request content type
application/json
Body
The body of the request for replenishment of the advance balance
userIdstringRequiredExample:
User ID
f3ae5860-0da1-448e-b94a-2aad0ff8b195
organizationIdstringRequiredExample:
Organization ID
d225cb26-2704-407a-9501-754f78aca82d
advancedBalanceIdstringRequiredExample:
ID of the advance balance
81543b97-912a-4c71-9651-3a376a1958ce
amountstringRequiredExample:
The amount for which the balance is replenished
4.87
Responses
200Success
application/json
post
POST /partner/api/top-up-advanced-balance HTTP/1.1
Host: ocp.onchainpay.io
Content-Type: application/json
Accept: */*
Content-Length: 180
{
"userId": "f3ae5860-0da1-448e-b94a-2aad0ff8b195",
"organizationId": "d225cb26-2704-407a-9501-754f78aca82d",
"advancedBalanceId": "81543b97-912a-4c71-9651-3a376a1958ce",
"amount": "4.87"
}
200Success
{
"success": true,
"response": {
"advancedBalanceId": "81543b97-912a-4c71-9651-3a376a1958ce",
"currency": "USD",
"blocked": true,
"blockReason": null,
"balance": "12",
"availableCurrenciesForDeposit": [
"USDT"
]
}
}
Last updated