# Embedded calls

Request a payment, verify a mandate or a record, and read the money split for your customers from inside your own product, each customer under its own policy.

Status: Live · Updated: 2026-09-14
For: platform
Source: https://enruta.ai/docs/embedded-calls

Everything an agent, a developer or a seller can do, a platform can do for a connected account: the same endpoints, decisions and records, with `Enruta-Account` saying whose they are. Each account keeps its own policies, budgets, keys and chain, so one customer’s policy never decides another customer’s payment.

## Ask to pay for an account

```bash
curl https://api.enruta.ai/v0/payment-requests \
  -H "Authorization: Bearer $ENRUTA_PLATFORM_KEY" \
  -H "Enruta-Account: cust_48121" \
  -H "Enruta-Agent: agt_01M3D2…" \
  -H "Idempotency-Key: 7f41…" \
  -H "Content-Type: application/json" \
  -d '{
    "payee": { "name": "Ream & Rule", "domain": "reamandrule.com" },
    "amount": { "value": "77.04", "currency": "USD" },
    "purpose": "Office supplies for the Main Street clinic",
    "checkout": { "protocol": "ucp", "reference": "chk_01M3D5…" },
    "intent": { "text": "Restock printer paper and toner" }
  }'
```

The answer is the account’s decision: a mandate and a credential on `allow`, questions on `clarify`, an approval link on `step_up`, reasons on `deny`, and the id of the record sealed on the account’s chain.

## What platforms embed

| Call | For | Answers |
|---|---|---|
| `POST /v0/payment-requests` | An `agents` account’s agent | The decision, the mandate and credential, the record id |
| `POST /v0/payment-requests/{id}/clarifications` | The same agent | The request, decided again |
| `POST /v0/sellers/verify` | A `sellers` account | Whether a mandate is valid for the account’s domain |
| `GET /v0/records/{id}/verify` | Any account | A server-side verification report; `enruta-verify` gives the same offline |
| `GET /v0/payment-requests/{id}/economics`, `GET /v0/sellers/orders/{id}/economics` | Either side | The [money split](https://enruta.ai/docs/economics) of one payment |
| `GET /v0/records/{id}/psp-metadata?psp=` | PSPs and orchestrators | The fields to write into your own payment object ([PSP metadata](https://enruta.ai/docs/psp-metadata)) |

Every endpoint on the [API page](https://enruta.ai/docs/api) works the same way; the account’s role decides what is allowed.

## Isolation

- Each account is its own organization. Policies, budgets, keys, rails, consents and records never cross between accounts.
- A platform key without `Enruta-Account` reaches only `/v0/platform/*`.
- Suspending an account refuses every call made for it with `account_not_connected`; its records stay verifiable.

## Metering

Usage is counted per account and read with `GET /v0/platform/usage?period=YYYY-MM`: records, mandates, agent orders and dispute packets. Platforms pay by records in volume, never by the money that moves ([Pricing](https://enruta.ai/pricing)).
