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": "org_01M3D2…",
"agents": [{ "id": "agt_01M3D2…", "name": "Supplies agent", … }]
}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.
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 | Records, in volume: from $60,000 a year for at least 1M records (Pricing) |