read_published_page
Read Published Page
Read one of the published pages, for answering questions about how any of this works.
Use it rather than guessing. What the fees are, how a dispute is decided and who decides it,
what a buyer is agreeing to — all of it is written down, and none of it is safe to invent.
how-it-works How an protected payment works, start to finish
faq Common questions about protected payments, fees, disputes and timing
arbitration-policy How a dispute is decided, by whom, and on what evidence
terms-of-service The terms a buyer and seller are agreeing to
privacy-policy What is collected and why
plugins The WordPress and Shopify integrations
home What the product is and who it is for
Parameterspagerequired
prepare_escrow_payment
Prepare Escrow Payment
Work out where a payment must go, before anybody signs or sends anything.
`seller` and `nominal_buyer` may each be a wallet address OR AN EMAIL ADDRESS — an email is
converted to the wallet that person owns, so you never need to know a wallet to use this.
The parties are checked against the sanctions lists before an address is given. If any of
them is listed the answer is `error: sanctioned_party` with no address, and the payment
cannot be made through this service. The same answer comes back for terms whose payment
contract was already refused on sanctions grounds when its money arrived: its address is not
handed out again. If the check cannot be done right now the answer is
`error: service_unavailable` with `retryable: true` and no address; try again shortly.
Returns the payment address these terms produce, and TWO ways to fund it. Both end at the
same address holding the same money; they differ only in who sends the transaction.
**Transfer it yourself.** Send the tokens to the address from any wallet — a browser
wallet, a hardware wallet, an exchange withdrawal. Nothing to sign for us, and no `payer`
needed, because the payment contract never asks who paid: it reads its own balance. Then call
`settle_escrow_payment` with no signature and we create the payment contract around what is there.
**Or let us relay it.** Pass `payer` and this returns an EIP-3009 authorization for them to
sign. We broadcast it and pay the gas, so **the payer needs no gas at all**. This is the
only one an agent can complete unattended, and the only one that needs a key anywhere.
Either way the address is the same, because it is a pure function of the terms. That is
also what makes the relayed form safe: the payer signs `to` as part of the authorization,
committing to every term at once — alter any of them afterwards and the address moves and
the signature stops matching.
`amount` is in the TOKEN's base units (1 USDC = 1000000), because that exact figure is one
of the terms the addre
Parametersbrandpayeramountrequiredsellerrequiredarbiterdescriptionexternal_idproduct_nametoken_symbolnominal_buyerrequiredexpiry_timestamprequired
settle_escrow_payment
Settle Escrow Payment
Create the payment contract around the money and return a signed receipt.
`seller` and `nominal_buyer` may be wallet addresses OR EMAIL ADDRESSES, exactly as in
`prepare_escrow_payment`; an email converts to the same wallet it did there.
Works both ways, and which one runs is decided by whether you pass a signature:
**Already transferred it yourself** — omit `authorization` and `signature`. We check the
address holds the amount and build the payment contract around what is there. If the transfer has not
arrived it says so, and nothing is spent finding out.
**Want us to relay it** — pass the payer's `authorization` and `signature`. We broadcast it
and pay the gas, so the payer needs none. This process holds no key and signs nothing; it
is handed a signature and carries it.
Pass the terms exactly as they were prepared. They ARE the payment contract's address, so a single
altered figure moves it — and with a signature, stops matching what the payer signed.
`seller` and `nominal_buyer` may be wallet addresses or email addresses, as in
`prepare_escrow_payment`; an email resolves to the same wallet it did there.
⚠️ `external_id` MUST BE THE ONE `prepare_escrow_payment` RETURNED. It generates one when
you leave it out, and that generated value is only knowable from its result — send a
different one and this derives a different address, while the money is at the first.
⚠️ `error: sanctioned_party` IS FINAL. A party scored above 0 on the sanctions check when the
money arrived (or the payment contract was refused before): the money is frozen at its
address, and nothing more may be paid into it. Do not retry and do not offer to pay again.
⚠️ The receipt reports what the seller will actually RECEIVE in `token_amount`, with the
platform fee named beside it. That is less than the amount authorised, and the two
reconcile: token_amount + creator_fee = amount.
`brand` is the white-label partner, as in `prepare_escrow_payment`: attribution only, and
ignore
Parametersbrandamountrequiredsellerrequiredarbitersignaturedescriptionexternal_idrequiredtoken_symbolauthorizationnominal_buyerrequiredexpiry_timestamprequired
A scannable code for a payment request, so nobody retypes an address.
Pass the `payment_uri` from `prepare_escrow_payment`. Returns a QR a phone wallet can scan,
with the token, network, destination and amount already in it.
Or pass its `share_with_payer.pay_link`, for a code that opens the payment on the site
instead — what to hand someone who is being asked to pay, as the site's own requests do.
⚠️ A SEPARATE TOOL RATHER THAN PART OF `prepare`, because the two have different audiences.
`prepare` answers a machine and has to stay parseable; an image in its result would make
the structured fields something a client has to dig for. A person who needs the code asks
for it.
⚠️ AND IT ENCODES THE URI, NOT THE BARE ADDRESS. A QR holding only an address leaves the
amount and the token to be entered by hand, which is the part worth removing — a payment contract
funded with the wrong figure is not the payment contract these terms derive to, and the money sits
at an address nothing can deploy to.
Parameterspayment_urirequired
check_escrow_payment
Check Escrow Payment
What has happened to a settled payment, from the `status_url` on its receipt.
Parametersstatus_urlrequired
verify_escrow_receipt
Verify Escrow Receipt
Check a receipt's signature against the key its issuer publishes.
⚠️ THE KEY IS FETCHED FROM THE RECEIPT'S OWN `iss`, NOT FROM WHOEVER HANDED IT OVER.
Otherwise anything that can serve a receipt can also serve the key that vouches for it,
and the signature stops meaning anything.
Use this on receipts from anywhere, including ones this server did not produce.
Parameterspayment_receiptrequired