Biklo for developersTESTsandbox-api.biklo.comchange

Withdraw to the bank

POST/v1/wallet/withdrawals

scope wallet.withdraw

Send amount and currency together or neither — an amount without a currency is ambiguous the moment a seller holds two, so it is refused rather than guessed. With neither, everything available is withdrawn per currency. status: funds_settling is NOT a failure: the money was released and is settling at Stripe. A payout_failed is almost always a bank account that cannot receive the balance currency. Returns 409 onboarding_required when the seller has not finished Stripe onboarding in a browser.

Request body#

FieldTypeRequiredDescription
amountintegeroptionalMinor units — 45000 is 450,00. Omit BOTH fields to withdraw the full available balance in every currency you hold. A positive integer; 0 or a negative is rejected with invalid_amount (400).
currencystringoptionalWhich balance to draw on. Required whenever you send amount — a seller trading cross-border holds several, and guessing would move the wrong money (currency_required, 400). Sent alone, without amount, it is ignored and the full sweep runs.

Accepts Any currency you hold — see GET /v1/wallet/balance

Example

{
    "amount": 45000,
    "currency": "RON"
}

Response#

FieldTypeDescription
dataobjectWhat the withdrawal attempt actually did.
data.statusstringThe outcome, and it is deliberately more than success or failure. payout_created means money is on its way to your bank. funds_settling and released_settling are NOT failures — the money is released and moving, it just has not reached the bank yet, because Stripe holds incoming funds for a period before they can be paid out. no_available_funds means there was nothing to send. payout_failed means Stripe refused, and is the only one to treat as an error.

Accepts payout_created · funds_settling · released_settling · no_available_funds · payout_failed

data.withdrawalsarrayThe payouts created, one per currency. Empty when nothing could be sent yet.
data.withdrawals[].idstring|nullThe payout id. Quote it to support, and match it against GET /v1/wallet/withdrawals.
data.withdrawals[].amountinteger|nullMinor units.
data.withdrawals[].currencystring|nullIts currency.
data.withdrawals[].statusstring|nullWhere the payout is at the bank. It is normal for a fresh payout to sit pending for a day or two.
data.transferred_lotsintegerHow many per-order lots were released by this call. Non-zero with no payout means the money moved into your account and will leave on the next attempt.
data.settlingobjectMoney already released but still settling, as {currency: amount} in minor units. Empty when there is none. This is what explains a funds_settling status: try again once it clears rather than treating it as a failure.

Example

{
    "data": {
        "status": "payout_created",
        "withdrawals": [
            {
                "id": "po_1QxyzABC",
                "amount": 45000,
                "currency": "RON",
                "status": "pending"
            }
        ],
        "transferred_lots": 3,
        "settling": []
    }
}

Failures use the shared error envelope — a machine-readable code and a request_id to quote to support. Error handling.

curl -X POST "https://sandbox-api.biklo.com/v1/wallet/withdrawals" \
  -H "Authorization: Bearer bk_test_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 45000,
    "currency": "RON"
}'
<?php

$ch = curl_init('https://sandbox-api.biklo.com/v1/wallet/withdrawals');

curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST  => 'POST',
    CURLOPT_HTTPHEADER     => [
        'Authorization: Bearer bk_test_YOUR_KEY',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS     => json_encode([
      'amount' => 45000,
      'currency' => 'RON',
    ]),
]);

$response = json_decode(curl_exec($ch), true);
curl_close($ch);
using System.Net.Http;
using System.Net.Http.Headers;

var client = new HttpClient();
client.DefaultRequestHeaders.Authorization =
    new AuthenticationHeaderValue("Bearer", "bk_test_YOUR_KEY");

var request = new HttpRequestMessage(
    new HttpMethod("POST"),
    "https://sandbox-api.biklo.com/v1/wallet/withdrawals");

request.Content = new StringContent(
    @"{ ""amount"": 45000, ""currency"": ""RON"" }",
    System.Text.Encoding.UTF8,
    "application/json");

var response = await client.SendAsync(request);
var json = await response.Content.ReadAsStringAsync();
import requests

response = requests.post(
    "https://sandbox-api.biklo.com/v1/wallet/withdrawals",
    headers={"Authorization": "Bearer bk_test_YOUR_KEY"},
    json={
        "amount": 45000,
        "currency": "RON"
    },
)

data = response.json()
const response = await fetch("https://sandbox-api.biklo.com/v1/wallet/withdrawals", {
  method: "POST",
  headers: {
    Authorization: "Bearer bk_test_YOUR_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
      "amount": 45000,
      "currency": "RON"
  })
});

const data = await response.json();
import java.net.http.*;
import java.net.URI;

var client = HttpClient.newHttpClient();

var request = HttpRequest.newBuilder()
    .uri(URI.create("https://sandbox-api.biklo.com/v1/wallet/withdrawals"))
    .header("Authorization", "Bearer bk_test_YOUR_KEY")
    .header("Content-Type", "application/json")
    .method("POST", HttpRequest.BodyPublishers.ofString(
        "{ \"amount\": 45000, \"currency\": \"RON\" }"))
    .build();

var response = client.send(request, HttpResponse.BodyHandlers.ofString());