Authorization Decisions
The Authorizations API gives an agent a decision before money moves. It returns approved, needs_review, or blocked. Creating an authorization is always decision-only. An approved execution: internal authorization can use the separate execute route to create a linked PaymentIntent and frozen fee quote.
Create
POST /v1/authorizations
Authorization: Bearer <exchanged agent token>
Idempotency-Key: auth-demo-001
Content-Type: application/json{
"action_type": "ach_outbound",
"execution": "external",
"destination_counterparty_id": "cp_...",
"amount": "75.00",
"currency": "USD",
"reference": "inv-first-001"
}invoice_id links a RobotMoney Ledger invoice and requires attached invoice evidence; for your own invoice number use reference.
The caller needs an exchanged agent token with payment_intent:propose. execution: external is for customer-owned rails. RobotMoney source account, balance, reservation, and ledger snapshot checks return not_evaluated. Sanctions, agent state, policy, duplicate, counterparty trust, evidence, approval, amount, and window checks still run.
Use execution: internal with a RobotMoney USDC source account when the agent will explicitly request a linked sandbox PaymentIntent after approval. Creating the authorization still does not create the intent or dispatch a rail.
Idempotency-Key is required. Reusing the same key with the same body returns the same decision.
Response:
simulate: true is a dry run. It writes no authorization row, policy decision, audit event, webhook event, or billable usage record.
Execute An Internal Authorization
The execute route is available only when headless sandbox execution is enabled. The originating agent needs payment_intent:propose. The authorization must be approved, active, unexpired and use execution: internal.
The request has no body and accepts no amount, destination, fee, actor or policy overrides. Reusing the same key returns the same PaymentIntent and frozen quote.
HTTP 202 response:
recipient_amount is what the counterparty receives. The additive fee comes from the same agent wallet, and the gate, reservation and human approval cover total_debit. The quote hash binds the tenant, authorization, wallet, destination, amounts, fee policy and expiry. Accepted means the linked intent and quote exist. It does not mean a transfer was dispatched or settled.
Authorization detail and list responses expose the same nullable execution fields. For headless rows, submitted means a provider response was observed or a transaction hash was stored. settled means the principal transfer was independently verified in a finalized block. execution_fee_status separately reports pending, submitted, settled, failed, or waived. A fee failure does not move a settled principal back to a nonterminal state. Headless rows no longer return executed; non-headless linked rows keep that value unchanged.
Treat submitted as in progress, poll the authorization with backoff, and act on settled only. Keep polling the separate fee status when fee completion matters. In the Base Sepolia staging run for pi_01M5CMMMSV1F7W8EZVSDZYZGMG, the principal took about 24 minutes to reach finalized settlement and the fee took about another 24 minutes after its submission. These observed waits are not guarantees or local deadlines. Mainnet timing must be measured before the first pilot. The finalized receipt requirement remains the settlement gate for each leg.
The PaymentIntent detail includes the same frozen quote as execution_quote. Legacy PaymentIntents return execution_quote: null.
fee_quote.chain is the deployment-configured CAIP-2 chain. Clients must use the returned value and must not assume Base Sepolia. The contract accepts eip155:<positive chain id>; eip155:84532 above is an example from the current staging configuration.
Acknowledge The Quote And Approve
Every sandbox USDC payment requires a recorded human approval. The approver must send the exact quote hash shown above:
Omitting or changing the hash returns HTTP 409 with quote_acknowledgement_required. Sending quote_hash for a legacy PaymentIntent returns HTTP 400. Legacy approval without the field is unchanged.
An authorization that began as needs_review requires two human steps: approve the authorization decision, then approve the quote-bound PaymentIntent. An authorization that was already approved requires only the PaymentIntent approval. Agents never receive approval or dispatch authority.
Get
The HTTP detail route requires execution:read. MCP authorizations.get is available to agent principals with payment_intent:propose only for their own records. Human MCP principals can read tenant records with audit:read or an active admin member session.
List
The list route is tenant scoped and cursor paginated. It accepts optional filters for decision, agent_id, since, and until.
MCP authorizations.list exposes the same tenant-scoped filters and cursor pagination to human principals with audit:read or an active admin member session. Agent principals cannot list tenant authorization records.
Payment Context In Reads
Authorization detail and list records include payment_context_snapshot, the bounded history that existed before that authorization was decided. RobotMoney builds it from the same tenant, agent, and payee's recorded authorization history. No connected financial source is required. The history covers up to 100 rows from the preceding 90 days.
The snapshot includes:
is_first_decisionandincluded_decision_count;approved, needs-review, and blocked decision counts;
recent amount total, average, minimum, maximum, and currency;
first and last decision timestamps;
approved and rejected human review counts;
successful and failed execution counts; and
the last policy id and version used.
For a user principal, GET and list reads can also include payment_context_snapshot.reviews.most_recent_reason. This is the most recent human review reason for the same agent and payee, capped at 500 characters. Both approval and rejection reasons can appear. The field is added at read time and is not stored in the snapshot.
Agent principals and tenant service credentials never receive most_recent_reason; the property is omitted rather than returned as null. It is also omitted from authorization create responses, audit events, webhook payloads, and agent MCP reads.
See Payment Context Policy Conditions for the opt-in policy keys that can use this history.
Review And Void
Approve and reject apply only to needs_review records. They require a user principal or tenant service credential with payment_intent:approve. Agent principals are refused with actor_unresolved.
Approval uses the same authority checks as PaymentIntent approval: active member, admin or approver role, authorized approval domain, per-item limit, and actor-payee protection. Approval keeps the original expiry, applies duplicate protection, and counts an approved external authorization into amount and micropayment windows in the same transaction.
Approve and reject accept an optional reason string. The review stores that reason and includes it in the review audit output.
Void is for an approved external authorization that the customer did not pay. Only a user principal or tenant service credential may void. Voiding releases the counted amount from policy windows, including after the authorization has expired.
Review Expiry
Approved authorizations include expires_at. The default is 24 hours. Callers may set expires_at up to 7 days in the future. Expiry marks the authorization expired. Expiry does not release counted amount from policy windows.
Needs-review authorizations can expire before review. A review attempted after expiry returns the review-expired reason and leaves the authorization terminal.
Reason Codes
Common reason codes:
approved
The request passed policy and gate checks.
approval_required
Human review is required by policy.
over_per_authorization_limit
The amount is above the managed per-authorization limit.
over_daily_limit
The projected per-agent daily window is above the cap.
counterparty_unverified
The registered counterparty is not eligible for auto approval.
counterparty_not_registered
The counterparty is unknown and the request is blocked.
no_duplicate_payment
A prior approved authorization or PaymentIntent blocks the duplicate.
review_expired
The needs-review authorization expired before review.
owner_mandate_scope_mismatch
The payment agent, currency, or payee is outside the mandate.
owner_mandate_amount_exceeded
The payment exceeds the mandate cap or remaining amount.
owner_mandate_unconfirmed
The owner has not confirmed the supplied mandate.
owner_mandate_expired
The supplied mandate has expired.
owner_mandate_revoked
The owner revoked the supplied mandate.
owner_mandate_exhausted
The mandate has no remaining amount or uses.
owner_mandate_unknown
The supplied mandate id is not available in the tenant.
Blocked and voided authorizations never block a later duplicate. Approved authorizations block duplicates until voided, even after expiry.
Webhooks
Recorded, non-simulated decisions emit authorization.approved, authorization.needs_review, or authorization.blocked. Human review emits authorization.review_approved or authorization.review_rejected. Lifecycle changes emit authorization.voided and authorization.expired.
Webhook payloads include the decision, reason code, human-readable reason, recommendation, authorization id, invoice id, reference, expiry, policy id, policy version, amount, counterparty, agent, and correlation id. They do not include the raw action payload.
Last updated
