BillOSDocs
Console
Payments
POST/businesses/{bid}/standing-orders

Requires the documents scope.

A monthly charge of the customer's card on the business's own terminal. Nothing is charged by this call: it answers a url for the customer, who types his own card there and ticks a consent stating the amount, the day, the end and how to cancel. The business never types a card. chargeAtConsent takes the first charge when he agrees; otherwise the first charge is on the next dayOfMonth. It runs until cancelled unless maxCharges or endDate is given (one of them, not both). A refused charge is retried 1, 3 and 7 days after its day, then the order is failed (webhook standing_order.updated; every refusal is standing_order.charge_failed). The customer can cancel from his link at any time. Send an Idempotency-Key so a retried call is the same order. ⚠️ 422 not_supported where standing orders are not open: today they run only on a simulated terminal (sandbox keys), where a card ending 0002 is refused at every charge.

Path parameters

bidstringrequired
Business id, from POST /businesses.

Headers

Idempotency-Keystring
Your own stable id for this call. A retry returns the same row with deduped: true instead of creating a duplicate. Interchangeable with externalRef in the body.

Body

amountintegerrequired
What every charge takes, VAT included. Integer agorot (₪1 = 100).
descriptionstringrequired
What the customer is charged for.
dayOfMonthintegerrequired
1 to 28.
partyobjectrequired
Who is charged: a saved customer (partyId) or a name.
ShowHide 5 child attributes
party.partyIdstring
party.namestring
party.phonestring
party.emailstring
Where every receipt is mailed, with the link to cancel.
party.taxIdstring
chargeAtConsentboolean
Default false.
maxChargesinteger
End after this many charges.
endDatestring
No charge after this day.
externalRefstring
The same as the Idempotency-Key header.

Response

201: { "ok": true, … }

okbooleanrequired
standingOrderStandingOrderrequired
A standing order on a card (הוראת קבע בכרטיס אשראי): the customer is charged amount every month on dayOfMonth, on the business's own terminal. Opening one charges nothing: the customer opens url, types his own card and agrees to the terms himself, and the consent is recorded as he gave it. Every charge is a payment request (GET .../standing-orders/{id}/charges) that issues its receipt like a paid link. The card is kept as the card company's token, sealed, and is shown by its last four digits only.
dedupedboolean

Errors: 400, 401, 403, 404, 422, 429. Every failure answers { "error", "reason", "hint", "param", "doc_url", "retryable", "request_id" }: branch on reason, and read hint for what to change (https://docs.billos.co.il/errors.md).

curl -X POST "$BASE/businesses/$BID/standing-orders" \
  -H "X-Api-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "amount": 120000,
    "description": "איפור כלה",
    "dayOfMonth": 0,
    "party": {
      "name": "דנה לוי",
      "phone": "0521111111",
      "email": "dana@example.com",
      "taxId": "123456782"
    },
    "externalRef": "order-8812"
  }'
const res = await fetch(`${BASE}/businesses/${BID}/standing-orders`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "amount": 120000,
    "description": "איפור כלה",
    "dayOfMonth": 0,
    "party": {
      "name": "דנה לוי",
      "phone": "0521111111",
      "email": "dana@example.com",
      "taxId": "123456782"
    },
    "externalRef": "order-8812"
  }),
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.post(
    f"{BASE}/businesses/{BID}/standing-orders",
    headers={"X-Api-Key": KEY},
    json={
      "amount": 120000,
      "description": "איפור כלה",
      "dayOfMonth": 0,
      "party": {
        "name": "דנה לוי",
        "phone": "0521111111",
        "email": "dana@example.com",
        "taxId": "123456782"
      },
      "externalRef": "order-8812"
    },
)
data = res.json()
$ch = curl_init("$BASE/businesses/$BID/standing-orders");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["X-Api-Key: $KEY", 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'amount' => 120000,
    'description' => 'איפור כלה',
    'dayOfMonth' => 0,
    'party' => [
      'name' => 'דנה לוי',
      'phone' => '0521111111',
      'email' => 'dana@example.com',
      'taxId' => '123456782',
    ],
    'externalRef' => 'order-8812',
  ]),
]);
$data = json_decode(curl_exec($ch), true);
using System.Text;
using System.Text.Json;

using var http = new HttpClient();
using var req = new HttpRequestMessage(HttpMethod.Post, $"{BASE}/businesses/{BID}/standing-orders");
req.Headers.Add("X-Api-Key", KEY);
req.Content = new StringContent("""
    {
      "amount": 120000,
      "description": "איפור כלה",
      "dayOfMonth": 0,
      "party": {
        "name": "דנה לוי",
        "phone": "0521111111",
        "email": "dana@example.com",
        "taxId": "123456782"
      },
      "externalRef": "order-8812"
    }
    """, Encoding.UTF8, "application/json");
using var res = await http.SendAsync(req);
var data = JsonDocument.Parse(await res.Content.ReadAsStringAsync()).RootElement;
$BASE https://api.billos.co.il/v1$KEY a bk_test_… or bk_live_… key