Mandates
A Financial Mandate is the delegation of authority an agent acts under. Polivor's native format is the only one it enforces. The authoritative definition is the JSON Schema financial-mandate.v0.json; the API validates every mandate against it.
What a mandate says
| Part | Meaning |
|---|---|
principal | Whose money: an id and the legal name. |
approver | Who approved this version: person_id, an id in the person directory (POST /v1/persons). A mandate never carries a name or an email. |
agent | The agent id. An agent has exactly one mandate. |
authority | A short statement of what the agent may do. |
scope | The debtor accounts, currencies, beneficiary countries and payment types the agent may use. |
beneficiaries | How payees are chosen. Today: { "rule": "ALLOWLIST" }. |
limits | per_transaction_minor, daily_minor and monthly_minor, in minor units. |
approval | threshold_minor: above this amount a person must approve. |
validity | from and until, in UTC. |
policy_refs | Names of the policies the mandate refers to. |
In the console or through the API
An admin can register an agent and draft its mandate in the console: Agents, then Register agent, then Create its mandate. The form checks the same rules as POST /v1/agents and POST /v1/mandates, writes the same evidence, and creates the mandate as a DRAFT. Its approver puts it in force on the Mandates page. The console's mandate form takes one currency, EUR, since the payment types of a v0 mandate are SEPA schemes; amounts are entered in euros and stored in minor units, and validity dates are whole days in UTC. Everything else on this page applies to both.
Lifecycle
An agent has one mandate. It starts as a DRAFT, version 1.0, and is put in force with POST /v1/mandates/{id}/activate. A version never changes: POST /v1/mandates/{id}/versions creates the next one, which takes effect when activated. If only the validity dates differ from the latest version, the new version is a minor version (2.1 to 2.2); any other change makes a major version (2.1 to 3.0). A body identical to the latest version is refused (MANDATE_UNCHANGED). A decision records the mandate id and version it used, so old versions stay readable.
A mandate is never suspended; to stop an agent for a while, suspend the agent (POST /v1/agents/{id}/suspend, and /lift to restore it with the same mandate version). A version can be revoked for good with POST /v1/mandates/{id}/versions/{version}/revoke. Revoking the version in force leaves the agent with no authority until a new version is approved; an older version is never reinstated, so to return to old rules you create them as a new version. When the end of a version's validity passes, decisions are denied with MANDATE_EXPIRED; an extension is a new version with later dates. Suspending an agent or revoking a version takes effect on the next request, and a payment waiting for approval is denied if its mandate was revoked meanwhile.
People
Owners and approvers are people in the tenant's person directory: POST /v1/persons with a name, a title and an email. Everything signed or chained (mandate bodies, evidence, authorizations) refers to a person by id only. People who sign in to the console are users: POST /v1/users invites a person of the directory with a role (VIEWER reads, APPROVER also approves mandate versions, ADMIN does everything), the first sign-in activates the invitation, and POST /v1/users/{id}/deactivate ends their sessions at once and suspends the agents they own until an admin hands them to a new owner (POST /v1/agents/{id}/owner). POST /v1/persons/{id}/erase empties the person's name, title, email and approval comments; the evidence chain still verifies and shows the person as erased.
Import from AP2
If your agent already works with an AP2 payment mandate, POST /v1/mandates/import/ap2 (with the approver_person_id of the person who approves it) turns the credential into a DRAFT native mandate. AP2 stays an input format: nothing is enforced from AP2 itself.
- The credential must be signed by an issuer you registered as trusted (
POST /v1/trusted-issuers), with keys registered by hand, a JWKS URL, or both. A JWKS URL is fetched at every import and never cached. - The result lists what was mapped into the native mandate, what was unmapped (parts of the credential that a native mandate does not enforce) and what is missing (native fields to complete before activation).
- If the credential holds a constraint that a native mandate cannot enforce, the import is refused with
AP2_UNENFORCED_CONSTRAINTSunless you list that constraint inacknowledge_unenforced, one by one. A constraint type that AP2 does not define at all is never imported (AP2_UNKNOWN_CONSTRAINT).