PT EN

Conectores de pagamento

URL base: $BUSINESS_API

O objecto

connectorsarray of object · obrigatório
Mostrar atributos filhos
tenant_idstring · obrigatório
idstring · obrigatório
namestring · obrigatório
supported_methodsarray of string · obrigatório
operational_methodsarray of string · obrigatório
currencystring · obrigatório
hostnamestring · opcional
agent_versionstring · opcional
statusstring · obrigatório

um de online, busy, offline, decommissioned, revoked

modestring · opcional

um de pull, push

last_heartbeat_atstring · opcional · anulável
has_moreboolean · obrigatório
next_cursorstring · opcional
O objecto
{
  "connectors": [
    {
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "id": "idx_2xBW8Tr0oR5YsrNoIdzQO7t4Gjn",
      "name": "Ana Matsinhe",
      "supported_methods": [
        "supported method"
      ],
      "operational_methods": [
        "operational method"
      ],
      "currency": "MZN",
      "hostname": "hostname",
      "agent_version": "agent version",
      "status": "online",
      "mode": "pull",
      "last_heartbeat_at": "2026-11-19T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Criar um código de registo de conector

Registos

POST /payment-connectors/enrollment-tokens

Issue a payment connector enrollment token for the caller's tenant, returned once

Creates a one-time-visible enrollment token (prefixed enr_) that a payment connector exchanges to register itself with this tenant, and returns it with 201. The raw token is in the response only; just its hash is stored. The body takes an optional name (defaults to "default"), max_uses (0 means unlimited) and valid_duration_seconds (defaults to 30 days). Requires the payments:write permission.

Corpo application/json

namestring · opcional
max_usesinteger · opcional
valid_duration_secondsinteger · opcional

Devolve

201 Token issued

Mostrar atributos
tenant_idstring · obrigatório
idstring · obrigatório
tokenstring · obrigatório

Returned once; store securely before closing the dialog

namestring · obrigatório
max_usesinteger · obrigatório
uses_countinteger · obrigatório
expires_atstring (date-time) · obrigatório
created_atstring (date-time) · obrigatório

Erros 400 · 403

Permissões payments:write · Funções: admin, billing_clerk, finance, owner

curl -X POST "$BUSINESS_API/payment-connectors/enrollment-tokens" \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Ana Matsinhe",
  "max_uses": 1,
  "valid_duration_seconds": 1
}'
Resposta 201
{
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "id": "idx_2xBW8Tr0oR5YsrNoIdzQO7t4Gjn",
  "token": "token",
  "name": "Ana Matsinhe",
  "max_uses": 1,
  "uses_count": 1,
  "expires_at": "2026-11-19T09:30:00Z",
  "created_at": "2026-11-19T09:30:00Z"
}

Listar conectores de pagamento

Registos

GET /payment-connectors

List the tenant's payment connectors with their mode and operational_methods

Returns the payment connectors registered for the tenant, sorted by ID, in a response with connectors, has_more and next_cursor. Paging uses limit and an after cursor, and a malformed cursor returns 400. Requires the payments:read permission.

Parâmetros

limitinteger · consulta · opcional

Maximum resources to return (default 20, maximum 100).

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

Devolve

200 Connectors

Mostrar atributos
connectorsarray of object · obrigatório
Mostrar atributos filhos
tenant_idstring · obrigatório
idstring · obrigatório
namestring · obrigatório
supported_methodsarray of string · obrigatório
operational_methodsarray of string · obrigatório
currencystring · obrigatório
hostnamestring · opcional
agent_versionstring · opcional
statusstring · obrigatório

um de online, busy, offline, decommissioned, revoked

modestring · opcional

um de pull, push

last_heartbeat_atstring · opcional · anulável
has_moreboolean · obrigatório
next_cursorstring · opcional

Erros 403

Permissões payments:read · Funções: admin, analyst, billing_clerk, customer_service, finance, owner, viewer

curl -X GET "$BUSINESS_API/payment-connectors" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "connectors": [
    {
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "id": "idx_2xBW8Tr0oR5YsrNoIdzQO7t4Gjn",
      "name": "Ana Matsinhe",
      "supported_methods": [
        "supported method"
      ],
      "operational_methods": [
        "operational method"
      ],
      "currency": "MZN",
      "hostname": "hostname",
      "agent_version": "agent version",
      "status": "online",
      "mode": "pull",
      "last_heartbeat_at": "2026-11-19T09:30:00Z"
    }
  ],
  "has_more": true,
  "next_cursor": "next cursor"
}

Remover um conector de pagamento

Registos

DELETE /payment-connectors/{id}

Removes the connector registration from the tenant, so it can no longer pick up payment jobs for this tenant, and returns 204. The delete is idempotent: an unknown ID also returns 204. Requires the payments:write permission.

Parâmetros

idstring · caminho · obrigatório

ID of the registered payment connector (prefixed pcn_).

Devolve

204 Removed

Erros 403

Permissões payments:write · Funções: admin, billing_clerk, finance, owner

curl -X DELETE "$BUSINESS_API/payment-connectors/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 204

Removed