Skip to content

Authentication

Each device has two credentials in the dashboard (Settings → Merchant → Devices). Never mix them:

KeyFormatUsed in
API KeyUUID4 (e.g. a1b2c3d4-0000-4000-8000-000000000000)X-Device-Id header on every REST request.
Secret KeyHexadecimalOnly to verify HMAC on incoming webhooks. Never sent in requests.

Every request to pos.b4bit.com/api/v1/* must include:

X-Device-Id: <tu-api-key>
Ventana de terminal
curl -H "X-Device-Id: $B4BIT_API_KEY" \
https://pos.b4bit.com/api/v1/currencies

The webhook URL (where B4bit Pay will send status-change notifications) is configured in the device’s notification_url field, not managed through the API. The signature is verified with the hexadecimal Secret Key — see webhook.

  • HTTP 403 — Missing or invalid X-Device-Id.
  • HTTP 500 — Internal server error. Retry with exponential backoff.

See errors for the full list.