curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/opt-out/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048"
}
'[
{
"id": "c56eb572-9435-4643-91aa-337c7058bc86",
"transaction_id": "da0cbef0-4cb1-40e3-bdd1-65247739a5e5",
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"opt_in_id": "c468be09-3a1f-41aa-ad08-c7d715957105",
"asset": "BTC",
"created_at": "2025-04-10T15:57:28.780194Z"
},
{
"id": "c56eb572-9435-4643-91aa-337c7058bc87",
"transaction_id": "da0cbef0-4cb1-40e3-bdd1-65247739a5e6",
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"opt_in_id": "c468be09-3a1f-41aa-ad08-c7d715957106",
"asset": "ETH",
"created_at": "2025-04-10T15:57:28.780195Z"
}
]Yield Opt Out
De-register a user from the yield-earning program. The user will stop receiving interest on their eligible balances. By default every active opt-in of the user is closed. Send the optional asset field to opt out of a single product instead, leaving the other opts of the user active. Requires that the user has an active opt-in for what is being opted out of.
curl --request POST \
--url https://sandbox-b2b.ripio.com/api/v1/opt-out/ \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048"
}
'[
{
"id": "c56eb572-9435-4643-91aa-337c7058bc86",
"transaction_id": "da0cbef0-4cb1-40e3-bdd1-65247739a5e5",
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"opt_in_id": "c468be09-3a1f-41aa-ad08-c7d715957105",
"asset": "BTC",
"created_at": "2025-04-10T15:57:28.780194Z"
},
{
"id": "c56eb572-9435-4643-91aa-337c7058bc87",
"transaction_id": "da0cbef0-4cb1-40e3-bdd1-65247739a5e6",
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"opt_in_id": "c468be09-3a1f-41aa-ad08-c7d715957106",
"asset": "ETH",
"created_at": "2025-04-10T15:57:28.780195Z"
}
]asset
therefore returns a list of a single element.
Opt out of every active opt-in or Opt out of a single product — to see a
request paired with the response it actually produces.Opt out of every active opt-in
Omitasset. Every active opt-in of the user is closed, and one opt-out comes back per product.
{
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048"
}
[
{
"id": "c56eb572-9435-4643-91aa-337c7058bc86",
"transaction_id": "da0cbef0-4cb1-40e3-bdd1-65247739a5e5",
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"opt_in_id": "c468be09-3a1f-41aa-ad08-c7d715957105",
"asset": "BTC",
"created_at": "2025-04-10T15:57:28.780194Z"
},
{
"id": "c56eb572-9435-4643-91aa-337c7058bc87",
"transaction_id": "da0cbef0-4cb1-40e3-bdd1-65247739a5e6",
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"opt_in_id": "c468be09-3a1f-41aa-ad08-c7d715957106",
"asset": "ETH",
"created_at": "2025-04-10T15:57:28.780195Z"
}
]
Opt out of a single product
Sendasset. Only the opt-in of that product is closed and the rest stay active. The user must
have an active opt-in for it, otherwise the request fails with error code 20038 and nothing is
changed.
{
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"asset": "USDT"
}
[
{
"id": "c56eb572-9435-4643-91aa-337c7058bc88",
"transaction_id": "da0cbef0-4cb1-40e3-bdd1-65247739a5e7",
"end_user_id": "75c741a2-c3c8-46b1-a807-4fa1f40bf048",
"opt_in_id": "c468be09-3a1f-41aa-ad08-c7d715957107",
"asset": "USDT",
"created_at": "2025-04-10T15:57:28.780196Z"
}
]
Authorizations
B2B’s White Label API uses OAuth2. Currently there is only one supported authentication flow:
- clientCredentials allows you to access your own B2B account (First-Party Integration) and performs transactions against the public API. This oauth2 flow is well suited for this API, as it allows machine-to-machine communication.
Every call to the API has to be authenticated with an OAuth2 Token. In order to request this token, you will need to have sandbox or production API Keys (client id and client secret) that will be needed to generate a credential in order to negotiate an ephemeral access token.
Every request must be accompianed by an Authorization header with a value that follows the following schema: Bearer ACCESS_TOKEN
Body
End user's external ref.
Optional. Symbol of the single product to opt the end user out of, for example USDT. The end user must have an active opt-in for it. When omitted, every active opt-in of the end user is closed, which is the original behaviour of this endpoint. Send one request per product: each one either succeeds for that product or fails leaving the other opts active.
Response
Successful Creation
UUID used as opt out identifier.
UUID used as opt out's transaction identifier.
Unique identifier used as end user's external ref.
UUID identifier of the related opt in.
Asset symbol.
ISO format creation datetime
Was this page helpful?