PT EN

Planos de pagamento

URL base: $CONSUMER_API

O objecto

idstring · obrigatório
tenant_idstring · obrigatório
case_idstring · obrigatório
account_idstring · obrigatório
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

total_amount_centsinteger (int64) · obrigatório
installment_countinteger · obrigatório
installment_amount_centsinteger (int64) · obrigatório
remaining_amount_centsinteger (int64) · obrigatório
next_due_datestring (date-time) · obrigatório
statusstring · obrigatório

um de active, completed, defaulted, cancelled

interest_basis_pointsinteger · opcional
interest_amount_centsinteger (int64) · opcional
installmentsarray of PlanInstallment · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
plan_idstring · obrigatório
numberinteger · obrigatório
due_datestring (date-time) · obrigatório
amount_centsinteger (int64) · obrigatório
statusstring · obrigatório

um de pending, paid, overdue

paid_atstring · opcional · anulável
created_atstring (date-time) · obrigatório
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório
O objecto
{
  "id": "pay_2Y8DroSLB6irBEM756sHb0qz5Mk",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "case_id": "cas_2gmnNK0lRMC9tOMtZsWDhKGHpGe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "total_amount_cents": 125000,
  "installment_count": 1,
  "installment_amount_cents": 125000,
  "remaining_amount_cents": 125000,
  "next_due_date": "2026-11-19T09:30:00Z",
  "status": "active",
  "interest_basis_points": 1,
  "interest_amount_cents": 125000,
  "installments": [
    {
      "id": "pla_2HjiILFe8bV48DfMmhxs4j54up1",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "plan_id": "pla_2lVU4nTwUfHw6nxUwjbOeRn8u5D",
      "number": 1,
      "due_date": "2026-11-19T09:30:00Z",
      "amount_cents": 125000,
      "status": "pending",
      "paid_at": "2026-11-19T09:30:00Z",
      "created_at": "2026-11-19T09:30:00Z"
    }
  ],
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}

Listar planos de pagamento

Registos

GET /payment-plans

Pages the payment plans (debt instalment agreements) on accounts linked to the caller. Filter with account_id, case_id and status; pagination uses limit and after.

Parâmetros

limitinteger · consulta · opcional

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

afterstring · consulta · opcional

Opaque cursor returned by the previous page.

account_idstring · consulta · opcional

Restrict results to one linked consumer account.

Devolve

200 Payment plans

curl -X GET "$CONSUMER_API/payment-plans" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200

Payment plans

Obter um plano de pagamento

Registos

GET /payment-plans/{id}

Returns one payment plan, with its instalments and status, when it belongs to an account linked to the caller. Plans outside the caller's scope return 404.

Parâmetros

idstring · caminho · obrigatório

Identifier of the payment plan to return.

Devolve

200 Payment plan belonging to one of the consumer's linked accounts

Mostrar atributos
idstring · obrigatório
tenant_idstring · obrigatório
case_idstring · obrigatório
account_idstring · obrigatório
account_numberstring · opcional

Number of the referenced account, e.g. CTA-000044. Omitted when unknown.

account_holder_namestring · opcional

Display name of the customer who holds the referenced account. Omitted when unknown.

total_amount_centsinteger (int64) · obrigatório
installment_countinteger · obrigatório
installment_amount_centsinteger (int64) · obrigatório
remaining_amount_centsinteger (int64) · obrigatório
next_due_datestring (date-time) · obrigatório
statusstring · obrigatório

um de active, completed, defaulted, cancelled

interest_basis_pointsinteger · opcional
interest_amount_centsinteger (int64) · opcional
installmentsarray of PlanInstallment · opcional
Mostrar atributos filhos
idstring · obrigatório
tenant_idstring · obrigatório
plan_idstring · obrigatório
numberinteger · obrigatório
due_datestring (date-time) · obrigatório
amount_centsinteger (int64) · obrigatório
statusstring · obrigatório

um de pending, paid, overdue

paid_atstring · opcional · anulável
created_atstring (date-time) · obrigatório
created_atstring (date-time) · obrigatório
updated_atstring (date-time) · obrigatório

Erros 401 · 403 · 404

curl -X GET "$CONSUMER_API/payment-plans/{id}" \
  -H "Authorization: Bearer sk_test_..."
Resposta 200
{
  "id": "pay_2Y8DroSLB6irBEM756sHb0qz5Mk",
  "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
  "case_id": "cas_2gmnNK0lRMC9tOMtZsWDhKGHpGe",
  "account_id": "act_2JFioNDgIfvkgflk8RtcqhBaARP",
  "account_number": "ACC-2026-000142",
  "account_holder_name": "Ana Matsinhe",
  "total_amount_cents": 125000,
  "installment_count": 1,
  "installment_amount_cents": 125000,
  "remaining_amount_cents": 125000,
  "next_due_date": "2026-11-19T09:30:00Z",
  "status": "active",
  "interest_basis_points": 1,
  "interest_amount_cents": 125000,
  "installments": [
    {
      "id": "pla_2HjiILFe8bV48DfMmhxs4j54up1",
      "tenant_id": "ten_2ugFXIC316WXzGu1HGal90AxTA6",
      "plan_id": "pla_2lVU4nTwUfHw6nxUwjbOeRn8u5D",
      "number": 1,
      "due_date": "2026-11-19T09:30:00Z",
      "amount_cents": 125000,
      "status": "pending",
      "paid_at": "2026-11-19T09:30:00Z",
      "created_at": "2026-11-19T09:30:00Z"
    }
  ],
  "created_at": "2026-11-19T09:30:00Z",
  "updated_at": "2026-11-19T09:30:00Z"
}