beel_initiate_payment_connection
Opens an authorization session so the holder of a company your account manages
can connect a payment provider (stripe), and returns the authorization_url where they
authorize it.
return_url: once the holder authorizes, BeeL's callback finalizes the connection and redirects back to thereturn_urlof your portal, if you supplied one, with the parameters described underreturn_url.When the connection appears: it is created only when the holder authorizes, so it does not appear in
GET /v1/companies/{company_id}/payment-connectionsuntil then. It is sealed under the NIF in the path, so auto-invoicing issues under that NIF.The NIF must be activated in the mode of your API key (
beel_sk_test_*→ Test,beel_sk_live_*→ Live); otherwise the request answers400COMPANY_NOT_ACTIVATED_IN_ENVIRONMENTand noauthorization_urlis issued, because without activation there is no invoice series or tax configuration to invoice with. Test and Live activations are independent — a NIF activated in one mode still needs activating in the other.One provider account, one NIF: a provider account (
acct_...) can be connected to a single NIF across the whole platform. Authorizing the same provider account from a second NIF does not move it: the callback fails withOAUTH_ACCOUNT_CONNECTED_TO_OTHER_COMPANY, and the existing connection keeps invoicing under the NIF it was sealed with. To move it, firstDELETE /v1/companies/{company_id}/payment-connections/{provider}on the NIF that holds it, then open a new authorization on the NIF you want it under.
Endpoint: POST /v1/companies/{company_id}/payment-connections/authorizations
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | Yes | ||
| company_id | Yes | Unique identifier (UUID) of the company the authorization is opened for — its identifier, not its NIF. It is the only source of context: the account that owns it is derived from it, and the `BeeL-Active-Company` header plays no part. A company you do not reach answers `403`, and so does a company that does not exist. | |
| idempotency_key | No | Optional idempotency key for this operation. Omit it and one is derived from the request itself, which makes a blind retry safe but also collapses a SECOND, deliberately identical operation into the first for 24 hours. Set it — to an order id, or anything unique per intended operation — whenever you mean to create something that may look identical to what you just created. |