{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/beel-es/json-schema/beel-es-initiate-payment-connection-request-schema.json",
  "title": "InitiatePaymentConnectionRequest",
  "description": "The authorization to open: which provider it is for, and where to send the holder back.\n",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/beel-es-companypaymentconnections-api-openapi.yml#/components/schemas/InitiatePaymentConnectionRequest",
  "type": "object",
  "required": [
    "provider"
  ],
  "properties": {
    "provider": {
      "type": "string",
      "description": "Payment provider slug in **lowercase**. Currently only `stripe` (Stripe Connect) is\noperative; `woocommerce` and `shopify` are reserved for future providers. Any other\nvalue answers `422`.\n"
    },
    "return_url": {
      "type": "string",
      "pattern": "^https://.*",
      "description": "URL of your portal to redirect the account holder back to after the OAuth callback\ncompletes. Must be an absolute `https://` URL. On **success** BeeL appends\n`status=success`, `provider` (slug), `company_id`, `connection_id` and `account`\n(the provider account id, e.g. `acct_...`). On **error** it appends `status=error`,\n`provider` and `message`, always a stable uppercase error code: `OAUTH_STATE_INVALID`\n(the authorization is unknown, expired or already used), `OAUTH_TOKEN_EXCHANGE_FAILED`\n(the provider rejected the code exchange), `ACCESS_DENIED` (the account holder declined\nat the provider), `OAUTH_ACCOUNT_CONNECTED_TO_OTHER_COMPANY` (the provider account is\nalready connected to another NIF; disconnect it there first),\n`OAUTH_ACCOUNT_HAS_HISTORY_IN_OTHER_COMPANY` (the provider account has payments recorded\nunder another NIF; connect a new provider account for this NIF),\n`PROVIDER_ERROR` (any other provider-reported failure) or\n`OAUTH_UNEXPECTED`. When omitted, the callback redirects to BeeL's default integrations\nscreen. A `return_url` that is not an absolute `https://` URL with a host is rejected\nup front with `422` `PAYMENT_RETURN_URL_INVALID`, and no authorization is opened.\n"
    }
  }
}