WWW-Authenticate: Payment header instead.
From the agent’s perspective it is a single call either way: supply a URL,
an idempotency key, and the budget to draw on; the platform reads which
protocol the URL speaks and does the rest.
What Anchorage Agentic Banking does for you
The agent only supplies a URL. Anchorage Agentic Banking owns every merchant-side interaction:1
Fetch
Anchorage Agentic Banking issues the agent’s GET or POST to the merchant
URL. On the Machine Payments Protocol only a GET is payable: a price
quoted in answer to a write means the merchant already took the write,
and paying for it would leave the agent unable to tell whether calling
again repeats the change.An agent on a mainnet account must supply an
https URL. An http URL
is refused before any request reaches the merchant, with an error that
names https, and a redirect from the merchant to an http address is
not followed. Over http, anyone on the network path could change the
merchant’s quote, including who gets paid. An agent on a testnet account
can still pay an http URL.2
Read the quote
The merchant responds with its price: on x402, an HTTP 402 carrying an
accepts array of the rails it takes; on the Machine Payments Protocol,
a WWW-Authenticate: Payment header naming one.3
Select
Where the merchant offers a choice, Anchorage Agentic Banking picks the
cheapest payable entry among the chains the agent is set up to pay on.
Today: USDC on Base (EVM) and USDC on Solana.
Paid inference settles chat completions, streamed or not, in USDC on
Solana. Image, music, and video generation pay only in USDC on Solana,
so they need a Solana wallet; speech and sound-effects generation pay on
either chain, chosen the same way as for a paid URL.
Sandboxes pay only in USDC on Base, so
they need a Base wallet.
What a generation costs
covers when a generation is charged and from which wallet.
An agent can also pay Solana merchants that charge by metered usage on
each request. Anchorage Agentic Banking reserves the merchant’s
per-request maximum and charges the actual amount the merchant reports.
The payment shows the charged amount once the merchant reports it. The
rest of the maximum normally goes back to the budget at that point too;
if that step fails, it goes back when the merchant settles.
When what the merchant settled can’t be matched to its reports,
Anchorage reviews the merchant’s payments. Customers are charged for what
the merchant settled, but no payment more than its maximum, and a
payment the merchant refused can be charged less. A payment the merchant
refused outright isn’t charged unless the merchant settles it. When the
merchant settles a payment it refused, support reviews it and sets its
charge, up to the payment’s maximum. Support starts from what the
merchant collected and can charge less. Anchorage covers what the
merchant collected beyond the charges support sets, and it isn’t charged
to anyone’s budget. When the charges can’t be traced to individual payments,
Anchorage sets each unreported payment’s charge, up to its maximum:
by fixed rules when the amounts settle it, and otherwise by support’s
review, which includes every case where the merchant collected more than
the payments’ maximums. That payment shows the charge Anchorage set
rather than one the merchant reported. A payment Anchorage hadn’t
started sending to the merchant is charged nothing, and review waits until Anchorage has read
the network past the last moment the merchant could collect a payment it
was sent. For paid URLs, chat completions (streamed or not), and
generations, when a merchant offers both a metered option and a
fixed-price option, Anchorage Agentic Banking picks the metered one
when it can take the request, so
the charge can be anywhere up to that maximum. A maximum above 10 USDC
uses the fixed-price option. The budget
must cover the per-request maximum: a metered payment
whose maximum exceeds the remaining budget is declined with
budget_limit_reached.4
Gate
Compliance and spending gates run. Failures here return a structured
error to the agent.
5
Sign
Anchorage Agentic Banking signs the payment authorization for the
selected chain — an off-chain EIP-3009 authorization on Base, or an SPL
token transfer on Solana. A Machine Payments Protocol quote is payable on
Solana only, and one naming another chain is refused.
6
Retry
On x402, Anchorage Agentic Banking re-issues the request carrying the
payment credential, and the merchant’s facilitator broadcasts to chain.
On the Machine Payments Protocol, Anchorage Agentic Banking re-issues the
request to the URL that asked for payment, carrying the payment
credential, and the merchant’s sponsor broadcasts it and pays the network
fee. The request carries any headers the merchant registered with
Anchorage Agentic Banking. It also carries the headers your original
request sent, such as an API key, unless a redirect took the request off
the origin of the URL you requested. A merchant that requires a header on
every request rejects the payment when that header isn’t among them.
Because the headers are sent again after the payment is signed,
malformed headers are refused before anything is paid: the headers must
be a JSON object of valid HTTP header names and valid string values, and
a name can’t appear twice in different case. Sending
null in place of
the object is the same as sending no headers. Values your request supplies
for headers such as Authorization, Cookie, Host, and User-Agent
are accepted and dropped before any request reaches the merchant, so send
a merchant API key in a header of its own, such as X-Api-Key.The paid request also carries an X-Refund-Address header naming a
refund address that belongs to your account, for the kind of chain the
payment used. The header carries one address. It’s separate from your deposit address, so the header
doesn’t give a merchant your deposit address. A merchant
that honors it sends any refund for that request there, and the refund
arrives in your account like any other incoming transfer. Anchorage Agentic
Banking sets this header itself and drops an X-Refund-Address your
request supplies. A payment on a chain your account can’t receive
deposits on carries no refund address. If the refund address can’t be
looked up in time, the paid request goes out without one rather than
holding up a payment that’s already signed. Where a refund for that
request goes is then up to the merchant, and it may not reach your
account.Anchorage Agentic Banking waits 30 seconds for the merchant’s answer to
the paid request, or 300 seconds on a metered payment. On x402, an agent
paying an endpoint that takes longer, such as a search over live sources,
a model call with tools, or creating a sandbox, can ask for a longer wait
of up to 120 seconds with the payment, and Anchorage Agentic Banking doesn’t retry that paid request when the wait ends. A metered payment always waits
the full 300 seconds. A Machine Payments Protocol payment keeps the
30-second wait. A wait outside 30 to 120 seconds is
refused before anything is paid. The merchant may still charge for a
request it’s working on when the wait ends.7
Return
On x402 the merchant’s response body — the paid resource — lands in the
agent’s tool result. When the merchant sends a settlement receipt, the
result reports it beside the body as typed fields: success, the
transaction, and the network, or for a metered payment, success, the
payment channel, the charged amount in the asset’s base units when the
receipt states it, and the network. The receipt is the merchant’s claim,
and a malformed one, or one that doesn’t state success, is reported as
unavailable.
On the Machine Payments Protocol the merchant answers the paid request
with the resource as the body and its acknowledgement that it took the
payment in a
Payment-Receipt header. The whole resource lands in the
agent’s tool result. An acknowledged
charge completes; Anchorage Agentic Banking treats the acknowledgement as
a claim and confirms it against the chain before the payment is final. A
merchant that answers without acknowledging the charge — no readable
acknowledgement, one naming a different charge, one reporting failure, or
a server error — returns an error naming the merchant’s HTTP status, and
the charge is not delivered again. Errors that report a
merchant’s answer carry the status and Anchorage Agentic Banking’s own
explanation, and leave out the merchant’s response text.On either protocol, an error after the payment was sent means the merchant
may have received the payment and may still settle it, even when the error
says delivery is still outstanding, so paying again risks paying twice. If the original payment completed, a new
key makes another, separate payment. Otherwise, before you pay again under a
new key, confirm with Anchorage support that the original payment did not
settle and can no longer settle: a declined or
expired status alone doesn’t prove it. The merchant holds the credential
and is the party that would submit it, so its own answer can’t settle the
question. After a
failed POST, PUT, PATCH, or DELETE, also check the merchant’s own
state, because the merchant may have acted on the first request.When a paid request reaches the merchant and no usable answer comes
back, Anchorage Agentic Banking records the payment instead of sending
it again. That includes a merchant that redirects the paid request to
another site: the redirect isn’t followed, because it would send the
payment somewhere else. The error names the payment and says it wasn’t sent again.
The payment completes if the merchant collects it. If an x402 merchant
doesn’t, the funds return when the payment authorization expires. A retry
with the same idempotency key returns this payment instead of paying
again. If the payment completed, a new key makes another, separate
payment. Otherwise, before you pay under a new key, confirm with Anchorage
support that the payment did not settle and can no longer settle.Anchorage Agentic Banking relays the merchant’s answer to the call that
sent the payment and doesn’t keep a copy. A retry with the same idempotency
key after the payment was sent to the merchant returns an error that names
the payment and says it was already sent and nothing new was charged, and
the paid request isn’t sent again. A retry of a payment that was signed but
not yet sent either sends it and returns the merchant’s answer, or returns an
error that names the payment without sending it. A retry of an ended
payment whose answer was recorded returns that recorded result without
contacting the merchant. A retry must be the same request as the first
call: a retry with the same key and a different URL, method, or body is
refused with an error that names the payment. If the payment completed, a
new key makes another, separate payment. Otherwise, before you pay under a
new key, confirm with Anchorage support that the payment did not settle and
can no longer settle.Over budget
When a crypto payment would take a budget past its cap (but passes compliance), Anchorage Agentic Banking declines it, so don’t poll for an approval. This applies to every budget, including a budget above the payment’s budget. A payment is declined withbudget_limit_reached. For a metered payment the
check is against its per-request maximum, so the budget must cover the
maximum. A metered payment the org balance can’t cover is declined with
insufficient_balance. The
payment API returns the reason as a structured field, so branch on it there. An
MCP pay tool returns an error result whose text carries the decline message.
To spend more, an org admin raises the cap, and the agent sends a new payment
with a new idempotency key. Resending the declined payment with its
original key returns the same decline.
Compliance failures (merchant not on allowlist, merchant under review) are also
hard rejects with no approval path. A merchant removed from the catalog is a
hard reject too: the payment is refused with “merchant is no longer available
for payments”, and the agent can search the catalog for another service.
Refused just before signing
Anchorage Agentic Banking checks the account, the agent, and the merchant again just before it authorizes a payment. If the account was frozen, the agent was paused or deactivated, the agent’s member was removed from your organization, the merchant was put back under review or removed from the catalog after the payment was accepted, the payment is declined with that reason and its reserved funds return to your balance and budget. In the rare case that an earlier attempt at the same payment may already have been authorized, the payment and its funds stay on hold. Contact Anchorage support about that payment, and don’t pay again until Anchorage confirms it did not settle and can no longer settle, because paying again risks paying twice. For a declined payment, once the account, agent, or merchant is active again, the agent sends a new payment with a new idempotency key.Slow merchant answers
A payment call waits for the payment and the merchant’s answer for up to 150 seconds when the agent’s client accepts progress updates, and up to 45 seconds when it doesn’t. A client that accepts progress updates gets one every few seconds while the call waits. When the answer isn’t back by then, the call returns a result saying the payment is still in progress. A payment already sent to the merchant keeps going. A payment on a payment channel is sent without another call. Any other payment not yet sent waits for the agent’s next call with the same idempotency key, which sends it. Once a payment is sent while the call is still waiting, the call waits for the merchant’s answer instead of returning in progress, because Anchorage Agentic Banking doesn’t keep a copy of that answer: a client that stops waiting before a slow merchant answers doesn’t get the answer, and a later call with the same key says the payment was already sent. A payment on a payment channel that is sent after the call returned in progress is the same: its answer isn’t returned. The connection closes after about three minutes, so an answer that takes longer than that isn’t returned either. If the merchant’s payment request changed or expired by then, that call can’t send it, and the funds stay held until the payment authorization expires. When the agent already has a payment recorded for that idempotency key, the result usually also gives its transaction ID, the same ID the agent’s transaction list shows. To get the result, the agent calls again with the same request (URL, method, headers, body, and budget) and the same idempotency key. That call waits on the same payment, so it never pays twice.Settlement
A payment shows asadmitted once Anchorage Agentic Banking admits it for
processing, and stays admitted until it is signed and recorded or is
declined. A metered payment is recorded as soon as it is signed, before it is
sent to the merchant’s side. The web dashboard shows an admitted payment as
“Processing”.
After signing, the payment stays in progress while the merchant’s side
broadcasts to chain (its facilitator on x402, its sponsor on the Machine
Payments Protocol). The transfer normally lands in seconds, and the payment
completes once the chain makes that transfer final, which takes longer
than the transfer itself. Until then the payment’s funds stay reserved. If
the signed authorization can no longer settle (it expired unused, and the
chain shows no settlement), the payment declines automatically and its
reserved funds normally release back to the account in the same pass — in
the rare case the release needs another step, Anchorage resolves it. Either
way no action is needed from the agent; an agent that still wants the
resource makes a new request with a new idempotency key. A payment whose settlement did land on chain is never
declined this way — it completes as usual.
Receiving payments
When your account receives a crypto payment — for example, a facilitator or another Anchorage Agentic Banking customer paying a priced URL you host — compliance screening runs on the payment before the funds become available. Each received payment carries one of these labels:
A received payment shows its label on the payments page next to the
transaction, and on the payment’s own detail page. Outbound payments you
send carry no screening label.
Idempotency
idempotency_key is account-scoped: two calls from the same account with
the same key collapse to one transaction, even when different agents on that
account send them. The same key from a different account is a separate
transaction. Use a fresh key for every distinct intent, such as a UUID.
A key can be up to 255 characters, or 251 when the merchant charges over MPP.
A longer key is refused before anything is paid, with an error
that names the limit. The exception is a key that already belongs to an x402
payment on the account: an MPP retry of it gets the other-protocol conflict
naming that payment.
On x402, a new key shaped like an on-chain transaction hash or signature is
rejected, because those values identify deposits. A payment already made under
such a key still returns that payment when you retry with the same key, and a
key that already identifies a transaction on the account that isn’t a payment,
such as a deposit, is refused with an error asking for a new key, and nothing
is paid.
On either protocol, a new key must hold only printable ASCII characters
(letters, digits, and punctuation), with at most single spaces between them.
The key is the reference people read to tell payments apart, so it can’t hold
a character outside printable ASCII, such as one that displays as nothing or
reorders the text around it. When an agent pays a URL, Anchorage trims spaces
and other whitespace from both ends of the key before it checks it. A payment already
made under such a key still returns that payment when you retry with it.
When a repeated payment call returns the first call’s recorded result, the
result is marked as a replay. When the payment was sent and no result was
recorded, the call returns an error naming the payment instead. Either way, no
new payment is made. Repeats sent at the same time can leave
the mark off a call that shared the payment or put it on the call that made
it, so treat the mark as a hint rather than proof of which call paid.
When an agent pays a URL, a key belongs to one request: the same method, URL,
and body. Headers aren’t compared, so send a request whose headers change what
it asks for with a new key. When a call to pay a URL reuses a key whose payment
was for a different request, the call returns a conflict and pays nothing. The
conflict names that payment once it is recorded. When two calls with the same
key are sent at the same moment, the key belongs to the call whose payment is
recorded first, regardless of which call started first. The other call gets a
duplicate-key conflict instead when both calls pay over the same protocol, or
the other-protocol conflict naming the recorded payment when they pay over
different protocols. The check applies when the earlier payment recorded the
request it was made for, whether that payment completed, is still in progress,
or was declined. A payment made by paying a URL records its request, whether
your agent paid it or Anchorage staff paid it while testing the agent.
A URL that answered without asking for payment created no payment, so its key
isn’t held. A payment that recorded no request keeps the repeat-call behavior
described above, so a different request can replay its result instead of
getting this conflict: a payment created before the check existed, an inference
payment, or a test payment Anchorage staff submit without paying a URL. On the Machine
Payments Protocol, a repeat that changes the payment’s amount, recipient,
network, token, memo, or URL is still refused, unless the payment has already
ended: a repeat of an ended payment is answered from that payment, whatever the
merchant now asks for, and pays nothing.
Use a new key for each new request, such as each status check you send to a
paid endpoint.
If the merchant answers a repeat call with a different protocol than the
original payment used, the call returns a conflict naming that payment and
makes no new one. Check that payment’s status. A payment that has not completed or
declined can still settle, and a declined or expired status does not prove the money stayed
put: a payment that settled anyway is later recorded as completed. If the
original payment completed, a new key makes another, separate payment.
Otherwise, before you pay again under a new key, confirm with Anchorage support
that the original payment did not settle and can no longer settle.
Cost estimates
Before calling for a paid URL, an agent can ask Anchorage Agentic Banking to price it without paying: no idempotency key, no budget, no signature, no funds held. The preview forwards the same method, headers, and body the real call would use, and reads the merchant’s quote back without acting on it — except that it does not resolve merchant-specific custom headers the way a real call does, so a merchant that requires one of those to answer may reject the preview even though the real call would reach it. For a merchant that charges by metered usage, the estimate shows the per-request maximum the payment reserves, not the expected charge. The preview refuses malformed request headers before it contacts the merchant, with the same message a payment returns for them, so it never prices a request whose headers would stop the payment. It also refuses anhttp URL for an agent on a mainnet
account, as a payment does.
The preview returns the merchant’s price terms, or the HTTP status when the
URL asks for no payment or the merchant’s server fails. It never returns the
merchant’s response body. When the merchant refuses the request with a status
such as 401, 403, or 404, the preview says the request was refused. The URL
can still charge once the request carries what the merchant expects. It shows an EVM recipient’s full address and a
Solana recipient’s address shortened to its first and last four characters;
the payment itself uses the full address. When the preview or a payment refuses a merchant’s
terms, the reason names a network, payment scheme, or asset only when
Anchorage Agentic Banking recognizes the value, and names only the URL the
agent asked for, never a URL the merchant supplied. A payment call does not
return a free URL’s content either: when the URL asks for no payment, the
agent gets the HTTP status and a note that the call charged nothing. An agent
receives a merchant’s content only for a request it paid for.
A retry of a call the agent already paid for, with the same idempotency key,
still returns the content that payment bought. If that payment is still
running, the note names it and the agent calls again to get its result.
That preview is not free of side effects, because the request it issues is
real: a preview against an endpoint that writes or deletes performs that
write or delete, exactly as paying for it would, before any money moves. On
the Machine Payments Protocol the preview prices a GET only: a preview of any
other method still sends that request to the merchant and then returns the
reason it was refused instead of a price. The
tool’s safety hints reflect this, so a client that reads those hints sees a
cost preview classed the same way as paying, not as a silent read — whether
that client actually pauses for approval before acting on the hint is up to
that client, not something Anchorage Agentic Banking can guarantee from here.
Each tool also states whether a call can move money, as a true or false
value named agentic.anchorage.com/moves_money in the tool’s metadata. A
cost preview carries false there and a payment carries true, so a client
that labels calls for its users can show a preview as a request with side
effects that spends nothing.