Skip to content
Developer Docs

Beneficiary accounts ​

Endpoints to add, query and choose the default among your organisation's beneficiary accounts (IBANs).

The first beneficiary account is registered during onboarding and is automatically configured as the organisation's default account. Further accounts are added from the Dashboard or through the API, as explained in Adding a beneficiary account.

Each beneficiary account has a unique identifier called creditorAccountUuid, used to indicate which account will receive the funds associated with an operation.

The creditorAccountUuid can optionally be sent when registering Pagafactu or Zertipay operations. If not specified, Zertiban will automatically use the beneficiary account flagged as default (isDefault=true) for the organisation.

WARNING

Only beneficiary accounts in ACTIVE status can be used to generate new operations or receive payments.

Who can use these endpoints ​

Every endpoint on this page supports two kinds of consumer. In both cases the organisation being acted on goes in the x-tenant-id header:

ConsumerTokenx-tenant-id
Direct integrationThe one from your own API credentialYour organisation's UUID
Collaborator (Partner/Agent)Its delegated token on the clientThe UUID of the client organisation it manages

A collaborator can only act on the organisations it manages: for any other, the API answers 403.

Adding a beneficiary account ​

POST/business-creditor-account/v1/business-creditor-account-verifications

Adding a beneficiary account requires verifying with the bank that its holder is the organisation. To do so, the holder authorises a €0.01 PSD2 verification payment from the account to be added; the amount is always refunded. The full process is:

  1. You call this endpoint and receive the request uuid and a gateway url.
  2. You redirect the account holder to that url, where they choose their bank and authorise the verification payment.
  3. If the bank is slow to confirm the payment, you receive the CREDITOR_ACCOUNT_VERIFICATION_PENDING webhook. It is optional and may last days.
  4. You receive the final outcome: CREDITOR_ACCOUNT_VERIFICATION_COMPLETED if the account was added or CREDITOR_ACCOUNT_VERIFICATION_FAILED if not.

The outcome is only delivered by webhook: see Beneficiary account events.

The organisation must be active

Accounts can only be added to organisations in ACTIVE status. Otherwise the API answers 409 with the code BUSINESS-CREDITOR-ACCOUNT-BUSINESS-NOT-ACTIVE.

shell
curl -X POST "https://api-sandbox.zertiban.com/business-creditor-account/v1/business-creditor-account-verifications" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-tenant-id: {businessUuid}" \
  -H "Content-Type: application/json" \
  -d '{
    "alias": "Collections account",
    "isDefault": true
  }'

Request body ​

The body is optional.

FieldTypeDescription
aliasStringAlias of the future account. Between 1 and 50 characters
isDefaultBooleanWhether the account should become the organisation's default once added. Defaults to false

201 response ​

json
{
  "uuid": "b8f1c0d2-6a3e-4f19-9c47-2d51e0a7b6f3",
  "url": "https://verify.zertiban.com/v1/pis/1a2b3c4d"
}
FieldTypeDescription
uuidUUIDIdentifier of the request, not of the account. It is the one carried in resource.uuid of the CREDITOR_ACCOUNT_VERIFICATION_* webhooks
urlURIGateway to redirect the holder to so they can authorise the verification payment

The new account's creditorAccountUuid arrives in resource.creditorAccount.uuid of the CREDITOR_ACCOUNT_VERIFICATION_COMPLETED webhook.

If a collaborator creates the request with its delegated token, the request is attributed to it and it also receives the outcome webhooks, alongside the organisation.

Responses ​

CodeWhen
201Request created
400Invalid request (for example, an alias longer than 50 characters)
403Forbidden, including a collaborator that does not manage the x-tenant-id organisation
409The organisation is not active (BUSINESS-CREDITOR-ACCOUNT-BUSINESS-NOT-ACTIVE)
500Internal error
json
{
  "timestamp": 1743097669507,
  "status": 409,
  "errors": [
    {
      "code": "BUSINESS-CREDITOR-ACCOUNT-BUSINESS-NOT-ACTIVE",
      "message": "The business is not active"
    }
  ]
}

List beneficiary accounts ​

GET/business-creditor-account/v1/business-creditor-accounts

shell
curl "https://api-sandbox.zertiban.com/business-creditor-account/v1/business-creditor-accounts?offset=0&limit=10" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-tenant-id: {businessUuid}"

Query parameters ​

ParameterTypeDefaultDescription
offsetint0Starting position
limitint—Results per page
q_statusenum (ACTIVE / DISABLED)—Filters by status. Omitted returns all. Invalid enum → 400
q_isDefaultboolean—Filters by whether the account is the default. Omitted returns all. Unparseable value → 400

Default behaviour

If no filters are applied, the endpoint returns all registered beneficiary accounts, including those in DISABLED status.

A collaborator sees every account of the organisation it manages, not only the ones it added.

200 response ​

json
{
  "total": 2,
  "results": [
    {
      "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "accountNumber": "ES91 2100 0418 ***** 4567",
      "type": "IBAN",
      "alias": "Cuenta principal cobros",
      "status": "ACTIVE",
      "isDefault": true,
      "aspsp": {
        "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "commercialName": "CaixaBank",
        "icon": "https://..."
      }
    }
  ]
}

Beneficiary account detail ​

GET/business-creditor-account/v1/business-creditor-accounts/{uuid}

shell
curl "https://api-sandbox.zertiban.com/business-creditor-account/v1/business-creditor-accounts/{uuid}" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-tenant-id: {businessUuid}"

200 response ​

json
{
  "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
  "accountNumber": "ES91 2100 0418 ***** 4567",
  "type": "IBAN",
  "alias": "Cuenta principal cobros",
  "status": "ACTIVE",
  "isDefault": true,
  "aspsp": {
    "uuid": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
    "commercialName": "CaixaBank"
  }
}

Response fields ​

FieldTypeDescription
uuidUUIDcreditorAccountUuid used to associate operations with a specific beneficiary account
accountNumberStringMasked account number
typeStringAccount type. Possible value: IBAN
aliasStringIdentifying name configured for the account
statusStringAccount status (ACTIVE / DISABLED). Only ACTIVE accounts accept payments
isDefaultBooleanIndicates whether this is the organisation's default beneficiary account
aspsp.commercialNameStringCommercial name of the banking entity

List and detail responses ​

CodeWhen
200List or detail returned
400Invalid request (for example, a q_status outside the enum)
403Forbidden, including a collaborator that does not manage the x-tenant-id organisation
404Detail only: the account does not exist or does not belong to the organisation
500Internal error

Default account ​

PATCH/business-creditor-account/v1/business-creditor-accounts/{uuid}/default

Sets an account as the organisation's default: the one Zertiban uses when you register an operation without a creditorAccountUuid. The previous default is unset automatically.

  • An organisation always has exactly one default account. The current one cannot be unset: to change it, set another one.
  • Only ACTIVE accounts can be set as default. With a DISABLED one, the API answers 409.
  • A collaborator can only set as default an account it added itself. Any other is answered as not found (404).
shell
curl -X PATCH "https://api-sandbox.zertiban.com/business-creditor-account/v1/business-creditor-accounts/{uuid}/default" \
  -H "Authorization: Bearer {access_token}" \
  -H "x-tenant-id: {businessUuid}"

The response is 204 with no body.

Responses ​

CodeWhen
204Account set as default
400Invalid request
403Forbidden, including a collaborator that does not manage the x-tenant-id organisation
404The account does not exist or does not belong to the organisation (BUSINESS-CREDITOR-ACCOUNT-NOT-FOUND)
409The account is disabled (BUSINESS-CREDITOR-ACCOUNT-DISABLED)
500Internal error