View as Markdown

Mandate · Guide

When a grant changes

When your agent's order is outside a network grant and a different limit would let it through, the response carries an adjust link. The person opens it, sees the limit that stopped the order and a suggested value, and can raise or lower the limit, approve this one order, or both in one passkey step. Then your agent retries.

Before you begin: your agent holds a network grant for the person and buys with POST /v1/mandate/network_orders.

What your agent gets

An order over the per-order cap or the budget, at a store that isn't listed, or in a category that isn't allowed asks the person, and the response adds adjust and retry:

{
  "object": "network_authorization",
  "result": "approval_required",
  "reason": "over_max_amount",
  "approval": { "id": "noa_01M5X9A2B7Q9V3N8K4T6W1Y0R6", "status": "pending" },
  "adjust": { "url": "https://app.provenanceauth.com/me/adjust?token=3r8Vx2pL0mW8sYd4cFjLhXn6gAe1pR5zT7uB3oN1yJ0", "expires_at": "2026-11-24T18:15:00.000Z" },
  "retry": "after_adjust"
}
adjust.urlstring
The link to show the person. It works once, with no sign-in to read it. Show it as is; don't shorten or rewrite it.
adjust.expires_atstring
An ask's link lasts as long as the ask (15 minutes), a refusal's 30 minutes.
retrystring
after_adjust means retry the same order once the person acts.

A refusal the person controls carries the link too: a store on the grant's own blocked list, a paused grant, or an order above your hard_max (over_ceiling). There is no link for the person's own rules (Ask me above, hours), a session's limits, a blocked agent or a revoked grant.

The same cart asked again returns the same link, and the person isn't asked twice.

Retry after the person acts

What the person didHow your agent continues
Approved the order (with or without a raise)Retry with approval_id. The token is minted once for that cart.
Changed the limit without approvingRetry the order as a fresh request. It passes the new limit or asks again.
Nothing yetThe ask stays pending until it expires; a retry with approval_id still works if they approve later.

Three ways to know when to retry:

  1. The mandate.network_grant.updated webhook with the new version.
  2. GET /v1/mandate/network_grants/{id}, whose version goes up on every change.
  3. A note on your agent's next call: "Your limit for this grant changed", delivered once.

The TypeScript SDK waits for you:

const grant = await provenance.mandate.network.waitForGrantChange(grantId, version);
if (grant) {
  // The person changed it: retry the order.
}

It polls with backoff from 1 to 15 seconds and returns null after 15 minutes.

Cap raises with hard_max

A person may raise a limit above what you asked for, with their passkey. To set a line they can't pass, send hard_max on the grant request. It can't be below proposed; leave it out for no ceiling.

{
  "agent_id": "agt_01M6VQDE86B7XMS0EDMWPT9K0S",
  "proposed": { "max_amount": 50, "budget_amount": 200, "budget_window": "week", "currency": "USD", "expires_at": "2027-06-30T00:00:00Z" },
  "hard_max": { "max_amount": 100, "budget_amount": 400 }
}

An order above hard_max is refused over_ceiling. Its link lets the person ask your agent to request more: your agent gets a note, and a new grant request with a higher hard_max is the way up. Stores and categories you blocked stay blocked whatever the person does.

Stores the person adds or removes

The person's home lists the stores each agent may buy at and its last purchase. From a grant they can remove a store, which saves at once, or add one back. Adding a store is a raise: it needs their passkey and only a store your request asked for. Either change reaches you as mandate.network_grant.updated with the grant's new allowed_stores.

How long a raise lasts

The person picks one when they raise a limit:

ChoicedurationEnds
Just this timeone_orderAt the next authorized order that needs it, or after 24 hours. On an ask, it's the one-order approval with no limit change.
Until the window endswindowAt the start of the next weekly or monthly budget window.
From now onongoingNever.

When a temporary raise ends, the grant goes back to its earlier limits and you get mandate.network_grant.updated with trigger: revert. If the person changed the grant again before then, their later change stands.

The webhook

Every change to the grant's limits or status sends mandate.network_grant.updated:

versioninteger
The grant's version after the change.
directionstring
tighten or loosen.
triggerstring
What led to it: an ask, a refusal, a notice, the person's own change, or a revert.
trigger_refstring
The ask or raise it came from.
durationstring
For a temporary raise, with temporary_until.
above_askboolean
True when a limit now passes what you asked for.
viastring
person or system (an automatic revert). Never the person's device.

The card an order pays with

Send payment_method on POST /v1/mandate/network_orders when you know the card. Never send a card number; it's refused with parameter_invalid. The card joins the person's card list, so they can see which agent paid with it.

brandstringRequired
visa, mastercard, amex, discover, jcb, unionpay, diners or other.
last4stringRequired
The card's last four digits.
walletstring
The wallet it pays through, such as apple_pay.
network_tokenboolean
True when the card is a network agent token.

A person can tie a grant to one card. An order that names a different card asks the person with the reason payment_card_mismatch; show approve_url as for any ask. An order without payment_method isn't checked against the card.

Integration checklist

  • Show adjust.url to the person whenever it's present.
  • Retry after an adjust: with approval_id for an approved order, fresh otherwise.
  • Handle mandate.network_grant.updated, or call waitForGrantChange.
  • Send hard_max if you need a line people can't raise past.
  • Expect over_ceiling and offer a new grant request.

Errors you might see

CodeWhat to do
over_ceiling (refusal reason)The order is above your hard_max. Offer the person a new grant request with a higher one.
order_deniedThe person denied the order from the link. Don't retry it.
order_approval_expiredThe ask expired before the person answered. Ask again with a fresh request.
parameter_invalidA hard_max below proposed, or one for a limit proposed leaves out.

See also