Docs Platforms
Platform accounts
LiveUpdated
Platforms. Written for PSPs, acquirers, orchestrators, dispute services and agent platforms that act for many customers.
A platform, such as a PSP, an acquirer, an orchestrator, a dispute service, an agent platform or a service that pays for many clients, holds one platform key. With it, it creates an Enruta organization for each customer, issues that customer’s keys, reads usage per customer, and acts for any connected account by naming it in a header.
Keys and headers
Platform keys start with enruta_plt_ and belong to a platform organization. A platform key reaches /v0/platform/* directly. To act for a connected account, add Enruta-Account: the request then runs as that account’s organization, as its developer for an agents account (as one of its agents when Enruta-Agent names it) or as the seller for a sellers account. An unknown or suspended account is refused with 403 account_not_connected.
| Header | Value | Effect |
|---|---|---|
Authorization | Bearer enruta_plt_… | Identifies the platform |
Enruta-Account | The account’s org id, its pla_ id, or your own external_ref | Acts for that account |
Enruta-Agent | agt_… | Acts as one of the account’s agents |
Create an account
{
"kind": "agents",
"name": "Northwind Clinics",
"external_ref": "cust_48121",
"owner_email": "ops@northwindclinics.example",
"agents": [{ "name": "Supplies agent" }],
"policy": { … }
}
201 {
"account": { "id": "pla_01M3D2…", "kind": "agents", "external_ref": "cust_48121", "status": "active", … },
"org_id": "acct_01M3D2…",
"agents": [{ "id": "agt_01M3D2…", "name": "Supplies agent", … }],
"owner_invitation": { "email": "ops@northwindclinics.example", "role": "owner", "status": "sent", "expires_at": "2026-10-18T17:04:12Z" }
}Enruta provisions the organization with the sandbox rail, the policy you pass (or the sample policy), the agents and the account. For kind: sellers, pass domains; each is verified like any seller domain. external_ref, owner_email, domains, agents and policy are optional.
owner_email is invited as the account’s Owner: Enruta emails that address an invitation from your platform organization’s Owner, valid for seven days. The account has no member until it is accepted, and only one Owner: the first to accept. owner_invitation says the invitation was sent, and is null without owner_email. Your platform organization needs an Owner who has confirmed their email address, or the request is refused with 409.
Connected accounts, filtered by kind and status, paged with after.
One account. PATCH the same path to change its status, for example to suspend it, or its metadata.
{ "role": "agent", "agent_id": "agt_01M3D2…", "name": "Supplies agent, production" }Issues a key for the account with the role agent, developer or seller. The key is shown once.
A month’s usage, per account: records, mandates, agent_orders and dispute_packets.
Records made for an account
A payment requested through a platform key belongs to the account’s organization: its policy decides it, its budget is reserved, and the record goes on its chain. The record’s agent.host is the platform organization’s slug, so the account, an issuer or an auditor can see which platform acted.
Interfaces
| Surface | Call |
|---|---|
| SDK | platform.accounts.*, platform.usage; new Enruta(key, { platform: { account } }) or enruta.forAccount(account) sets Enruta-Account on every call; in Python, Enruta(key, account=…) |
| CLI | enruta platform accounts ls, enruta platform accounts create |
| Console | /platform: accounts and usage; /platform/accounts/{id} |
| Price | Per sealed record, counted over the calendar year: $0.03 each for records 1 to 1,000,000, $0.025 from 1,000,001 to 10,000,000, $0.02 beyond 10,000,000. No annual fee (Pricing) |