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 /.
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.
retrystringafter_adjustmeans 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 did | How your agent continues |
|---|---|
| Approved the order (with or without a raise) | Retry with approval_. The token is minted once for that cart. |
| Changed the limit without approving | Retry the order as a fresh request. It passes the new limit or asks again. |
| Nothing yet | The ask stays pending until it expires; a retry with approval_ still works if they approve later. |
Three ways to know when to retry:
- The
mandate.network_grant.updatedwebhook with the newversion. - GET
/, whosev1/ mandate/ network_ grants/ {id} versiongoes up on every change. - 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:
| Choice | duration | Ends |
|---|---|---|
| Just this time | one_ | At 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 ends | window | At the start of the next weekly or monthly budget window. |
| From now on | ongoing | Never. |
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.
directionstringtightenorloosen.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.
viastringpersonorsystem(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.
brandstringRequiredvisa,mastercard,amex,discover,jcb,unionpay,dinersorother.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.urlto the person whenever it's present. - Retry after an adjust: with
approval_idfor an approved order, fresh otherwise. - Handle
mandate.network_grant.updated, or callwaitForGrantChange. - Send
hard_maxif you need a line people can't raise past. - Expect
over_ceilingand offer a new grant request.
Errors you might see
| Code | What to do |
|---|---|
over_ (refusal reason) | The order is above your hard_. Offer the person a new grant request with a higher one. |
order_ | The person denied the order from the link. Don't retry it. |
order_ | The ask expired before the person answered. Ask again with a fresh request. |
parameter_ | A hard_ below proposed, or one for a limit proposed leaves out. |