← HomeFleetPay / Schema

ParcelaRepasse

Structure preserved from the versioned API contract.

Technical descriptions are translated from the versioned contract. Original identifiers and JSON are preserved; data examples are omitted.

A driver transfer installment. The *_label fields are display text and may change; branch on status and evento, which are stable.

posicaointegerOptional

Installment position in the rule, from 1 to 3.

eventointegerOptional

The event that releases this installment, always matching its position:

  • 1 — scanning
  • 2 — completion in the app
  • 3 — accounting report submission
1 · 2 · 3
evento_labelstringOptional
percentualintegerOptional

This installment's percentage of the total transfer, frozen when materialized.

prazo_diasintegerOptional

The rule's D+N term, counted from the event. Applies only in automatic mode: in manual mode, the due date is the payment order date, and this number is informational.

valornumber · floatOptional
statusintegerOptional
valuemeaninghas a due datehas a payment
1waiting for an eventnono
5waiting for a payment order (manual mode only)nono
2released — has a due date and will be paidyesnot yet
3payment generatedyesyes
4canceled (CT-e canceled at SEFAZ)——

In manual mode, 5 is where the installment waits. pagar moves it to 2.

1 · 2 · 3 · 4 · 5
status_labelstringOptional
ocorrido_emstring | null · date-timeOptional

When the anchor event occurred, as declared by you.

vencimentostring | null · dateOptional

Exists only after release (automatic mode) or a payment order (manual mode). null while the installment has no date — this is a normal state, not an error.

liberado_emstring | null · date-timeOptional
origem_liberacaostring | nullOptional

Who released it: api (this API), panel (someone in the dashboard), or an internal event — scan (scanning), completion (completion in the app), or import_delivered (imported as already delivered). Only api and panel count as payer attestation for an advance.

antecipavelbooleanOptional

Whether the installment meets the term requirement for advance eligibility. Depends only on its term: true when prazo_dias is 1 or more, false for a D+0 installment — it does not change with status. A D+0 installment has no window between release and payment, so there is nothing to advance.

pagamento_idinteger | nullOptional

Payment generated by this installment, when one exists.

Original JSON Definition (Portuguese Descriptions)
{
  "type": "object",
  "description": "Uma parcela do repasse ao motorista. Os campos `*_label` são texto para exibição e podem\nmudar; ramifique por `status` e `evento`, que são estáveis.\n",
  "properties": {
    "posicao": {
      "type": "integer",
      "description": "Posição da parcela na regra, de 1 a 3."
    },
    "evento": {
      "type": "integer",
      "enum": [
        1,
        2,
        3
      ],
      "description": "O evento que libera esta parcela — sempre igual à posição:\n\n- `1` — bipagem\n- `2` — conclusão no app\n- `3` — prestação de contas\n"
    },
    "evento_label": {
      "type": "string"
    },
    "percentual": {
      "type": "integer",
      "description": "Percentual do repasse total desta parcela, congelado na materialização."
    },
    "prazo_dias": {
      "type": "integer",
      "description": "D+N da regra, contado a partir do evento. **Vale só no modo automático**: no manual o\nvencimento é a data da ordem de pagamento, e este número é informativo.\n"
    },
    "valor": {
      "type": "number",
      "format": "float"
    },
    "status": {
      "type": "integer",
      "enum": [
        1,
        2,
        3,
        4,
        5
      ],
      "description": "| valor | significado | tem vencimento | tem pagamento |\n|---|---|---|---|\n| `1` | aguardando evento | não | não |\n| `5` | aguardando ordem de pagamento *(só modo manual)* | não | não |\n| `2` | liberada — tem vencimento e vai pagar | sim | ainda não |\n| `3` | pagamento gerado | sim | sim |\n| `4` | cancelada (CT-e cancelado na SEFAZ) | — | — |\n\nNo modo manual, `5` é onde a parcela para. `pagar` a leva para `2`.\n"
    },
    "status_label": {
      "type": "string"
    },
    "ocorrido_em": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time",
      "description": "Quando o evento âncora aconteceu, como você declarou."
    },
    "vencimento": {
      "type": [
        "string",
        "null"
      ],
      "format": "date",
      "description": "Só existe a partir da liberação (automático) ou da ordem de pagamento (manual). `null`\nenquanto a parcela não tem data — o que é estado normal, não erro.\n"
    },
    "liberado_em": {
      "type": [
        "string",
        "null"
      ],
      "format": "date-time"
    },
    "origem_liberacao": {
      "type": [
        "string",
        "null"
      ],
      "description": "Quem liberou: `api` (esta API), `panel` (alguém no painel) ou o evento interno —\n`scan` (bipagem), `completion` (conclusão no app) ou `import_delivered` (importação\njá entregue). Só `api` e `panel` contam como atestação do pagador para a antecipação.\n"
    },
    "antecipavel": {
      "type": "boolean",
      "description": "Se a parcela entra na elegibilidade de antecipação. Depende só do prazo: `true` quando\n`prazo_dias` é 1 ou mais, `false` quando a parcela é D+0 — não muda com o `status`.\nUma parcela D+0 não tem janela entre liberação e pagamento, logo não há o que antecipar.\n"
    },
    "pagamento_id": {
      "type": [
        "integer",
        "null"
      ],
      "description": "O pagamento gerado por esta parcela, quando já existe."
    }
  }
}