BillOSDocs
Console
Payments
POST/businesses/{bid}/payment-terminal/simulate

Requires the businesses scope.

Sandbox only: puts the simulated terminal at any stage, and sends the same payment_terminal.updated webhook live would, so every screen and every handler can be tried. Owner only.

Path parameters

bidstringrequired
Business id, from POST /businesses.

Body

stagestringrequired
One of: setup, forms, approval, connecting, active, closed.

Response

200: { "ok": true, … }

okbooleanrequired
terminalPaymentTerminalrequired
The business's own card terminal (clearing). Opened by the business through the acquirer's and the terminal provider's own forms, held under BillOS's dealer account; the money goes from the acquirer to the business's bank and never passes through BillOS. No credential is ever returned.

Errors: 400, 401, 403, 404, 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/payment-terminal/simulate" \
  -H "X-Api-Key: $KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "stage": "setup"
  }'
const res = await fetch(`${BASE}/businesses/${BID}/payment-terminal/simulate`, {
  method: 'POST',
  headers: {
    'X-Api-Key': KEY,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    "stage": "setup"
  }),
})
const data = await res.json()
if (!data.ok) throw new Error(data.reason)
import requests
res = requests.post(
    f"{BASE}/businesses/{BID}/payment-terminal/simulate",
    headers={"X-Api-Key": KEY},
    json={
      "stage": "setup"
    },
)
data = res.json()
$ch = curl_init("$BASE/businesses/$BID/payment-terminal/simulate");
curl_setopt_array($ch, [
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_HTTPHEADER => ["X-Api-Key: $KEY", 'Content-Type: application/json'],
  CURLOPT_POSTFIELDS => json_encode([
    'stage' => 'setup',
  ]),
]);
$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}/payment-terminal/simulate");
req.Headers.Add("X-Api-Key", KEY);
req.Content = new StringContent("""
    {
      "stage": "setup"
    }
    """, 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