POST
/
api
/
v1
/
withdrawals
/
Create Withdrawal
curl --request POST \
  --url https://sandbox-b2b.ripio.com/api/v1/withdrawals/ \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "end_user": "customer_10",
  "currency": "BTC",
  "address": "0x36f672385c060290f4785F1ECFF58aE4aBB2FD15",
  "network": "BITCOIN_TESTNET",
  "amount": 1.5,
  "external_ref": "ac243840-ac04-4b3a-9efb-176554d4a029",
  "withdrawal_fee_id": "497f6eca-6276-4993-bfeb-53cbbbba6f08"
}'
{
  "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
  "created_at": "2019-08-24T14:15:22Z",
  "confirmation_date": null,
  "txn_hash": null,
  "end_user_id": "customer_10",
  "currency": "ETH",
  "amount": "0.002",
  "address": "0x36f672385c060290f4785F1ECFF58aE4aBB2FD15",
  "network_name": "BITCOIN",
  "status": "PENDING",
  "transaction_id": "8df65b81-8227-4d03-950d-0d8d5fef9402",
  "provisory_transaction_hash": null,
  "risk_score": null,
  "is_blocked": false,
  "reason": "",
  "external_ref": "8df65b81-8227-4d03-950d-0d8d5fef9402",
  "debited_amount": "0.0025"
}

Authorizations

Authorization
string
header
required

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
string

End use's external ref

currency
string

Currency of the amount to be withdrwaled

address
string

Destination address

network
string

Blockchain network to operate

amount
number

Amount to withdrawal. Is the amount that the destination address will receive.

external_ref
string

An external identifier, usually a unique UUID

withdrawal_fee_id
string

Indicates the withdrawal fee id to use in order to define the applied fees on this withdrawal.

Response

201 - application/json

Created

id
string<uuid>

UUID used as withdrawal identifier.

created_at
string<date-time>

Indicates the withdrawal request creation date.

confirmation_date
string<date-time> | null

Identifies the withdrawal confirmation date. This field will be null if the withdrawal is still pending.

txn_hash
string<hash> | null

Indicates the hash of the blockchain transaction, once completed. This field will be null if the withdrawal is still pending.

end_user_id
string

Identifies the user that owns this operation.

currency
string

Indicates the asset name involved in the withdrawal.

amount
number

Indicates the amount withdrawed.

address
string

Identifies the destination address.

Maximum length: 128
network_name
enum<string>
Available options:
BITCOIN,
ETHEREUM
status
string

Specifies the withdrawal status.

transaction_id
string

The ID of the associated transaction object

provisory_transaction_hash
string | null

Indicates the provisory hash of the blockchain transaction, could be different to txn_hash

risk_score
string | null

indicates the risk score of the withdrawal

is_blocked
boolean

indicates if the withdrawal was blocked

reason
string

indicates the block reason if the withdrawal was blocked

external_ref
string

Withdrawal external_ref defined in creation request

debited_amount
string

The withdrawal amount plus the withdrawal fee amount