Create a connected account

A connected account is a taxpayer you invoice for: its legal identity and
address. For ordinary sales, these details become the seller on its invoices.
Create one account per taxpayer VAT registration within your organization.

A connected account does not sign anything. Signing is done by a
device, which holds an NBR certificate. The
account's onboarding.mode decides whose device that is. See
connected accounts and devices.

curl -X POST "$BASE/connected-accounts" \
  -H "Authorization: Api-Key $KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Example Trading",
    "tax_registration_number": "200007019800002",
    "business_category": "Retail",
    "identification": {"type": "SUBCRN", "value": "136690-1"},
    "street_name": "Road 2830",
    "block": "Block 428",
    "building_name": "Trade Centre",
    "flat": "388",
    "city": "Manama",
    "country": "BH"
  }'

The values above are examples; supply the taxpayer's actual registered details.
Store the response's id as ACCOUNT_ID for subsequent calls. All five address
fields shown above are required.

Choose how to onboard

The onboarding object sets the account's invoicing mode. The mode can't be
changed later.

ValueModeWhat happensOTP
{"mode":"DIRECT","otp":"<fresh-otp>","sub_cr":"<branch-sub-cr>"}DIRECTCreates the account and registers the taxpayer's device for that branch in the same request.The taxpayer's, from its NBR portal.
Omit onboardingDIRECTCreates the account only. Register its device later with POST /devices/register.The taxpayer's, at device registration.
{"mode":"THIRD_PARTY"}THIRD_PARTYCreates the account only. Your organization's provider device signs its documents, so it never has a device of its own.None for the supplier.

If device registration fails, the account is still created, and the error
includes connected_account_id. Don't create the account again. List its
devices with GET /devices?connected_account_id={id}:

  • If a COMPLIANCE device exists, the OTP was already used. Finish with
    POST /devices/{device_id}/activate.
  • If no device exists, register one with POST /devices/register and a fresh OTP.

THIRD_PARTY registration requires complete provider identity and address on
PATCH /organizations/me. Configure the supplier's identification explicitly;
it does not come from the provider device or branch routing header. Register
the provider device before submitting
for delegated suppliers. The invoicing mode cannot be changed through PATCH.

List, update and remove accounts

RequestPurpose
GET /connected-accountsList your accounts; use page and page_size for pagination.
GET /connected-accounts/{id}Retrieve an account.
PATCH /connected-accounts/{id}Update supplied profile fields.
DELETE /connected-accounts/{id}Soft-delete the account and stop new submissions and pending retries.

Identity fields are protected while a DIRECT account has a COMPLIANCE or ACTIVE
device. Deactivate those devices before changing the certified identity.
identification, metadata and the optional PDF logo can be updated while
devices are active. A THIRD_PARTY supplier's VAT identity cannot be changed;
create a new account for a different taxpayer.

metadata is an optional JSON object for your own references. PATCH replaces
the object, and null clears it. Metadata is not sent to NBR; dates stored there
do not automatically expire authorization. Accepted documents remain available
after account deletion.


Create a connected account