curl; the Aro Mail pages in the dashboard do the same thing with buttons.
You need a custodial wallet holding enough cAROUSD (mint first if needed)
plus a little ETH for the escrow transaction. Recipients need an AroPay account
provisioned by Aro Media; there is no self-service sign-up, and a code stays
claimable until it expires, so they can claim once their account exists.
1
Create the letter
Post the amount, the sending wallet and the recipient’s postal address.
Save the id:The call blocks up to ~20 s for the escrow receipt. If it comes back as
country is an ISO 3166-1 code; postal is optional outside the US as long
as region is present; landmark prints as its own Near … line.DRAFT with escrow.status: "PENDING", poll GET /transfer/letter/$LETTER
until it reads ESCROWED: that is when the escrow transfer has confirmed
and its encrypted amount was verified against the letter.claimCode and claimUrl are shown to you here and on the detail read while
the letter is live, never in the list. Anyone holding the code can claim the
value once, so treat it like cash until it is in the envelope.amountVisibility defaults to visible for domestic letters and sealed
for international ones; expiresInDays defaults to 90 and 45 respectively
(1–180 allowed).2
Print it yourself, or mail it through Lob
••••••• cAROUSD), the QR, the claim
code for manual entry, the expiry date and a one-time-claim warning. It is
available from ESCROWED onwards; DRAFT and FAILED letters return
409 letter_not_printable, and finished letters render with a CLAIMED,
VOID or EXPIRED stamp so a reprint cannot pass as live.POST /transfer/letter/{id}/mail hands the same PDF to Lob and moves the
letter to MAILED:The response carries
mail.providerId, mail.status,
mail.expectedDeliveryDate and mail.testMode. With a Lob test key the
letter is validated and priced but never printed or mailed
(testMode: true); use it to rehearse. Mailing requires the deployment’s
public claim origin to be https: (400 claim_origin_not_public), and
the request is idempotent: retrying after a timeout adopts the letter Lob
already accepted instead of mailing a second copy.3
The recipient claims
The recipient scans the QR or opens the link. It lands on the public
claim page on the AroPay host with the code in the URL fragment (never
sent to the server), shows who the letter is from and, for visible letters,
how much, then asks them to sign in and pick a wallet. If the camera cannot
read the QR, they type the code from the letter.Programmatically, the same two calls back the page:The claim returns
{ letter, transaction }: the letter as CLAIMED (with
the sealed amount and memo now revealed) and the LETTER_CLAIM
transaction that credited the wallet. Codes are forgiving on input
(case, dashes, spaces, O/0 and I/L/1 mix-ups are corrected before
the checksum is checked). The claim is idempotent for the same recipient;
a second scan by anyone else gets 409 already_claimed. Senders cannot
claim their own letters (400 cannot_claim_own_letter).4
Track, and void if you need to
List your letters or read one; the detail read also refreshes Lob’s status
for mailed letters and finishes any in-flight leg:Each leg (Void works from
escrow, claim, refund) points at a normal
transaction row (LETTER_ESCROW, LETTER_CLAIM,
LETTER_REFUND) with its hash and explorer link, so receipts and history
work exactly as for any other transfer.To cancel an unclaimed letter and get the value back:ESCROWED at any time. Once MAILED you must send
acknowledgeMailed: true, confirming you understand the paper letter will
stop working (409 letter_not_claimable for whoever scans it); AroPay also
asks Lob to cancel the mailing on a best-effort basis. The refund is a
LETTER_REFUND transfer from the escrow vault back to the sending wallet’s
address; if it fails on-chain the letter stays VOIDED and the sweep
retries the refund.Letters nobody claims expire at expiresAt and refund the sender the same
way. Expiry is detected on read and by the operator’s scheduled sweep.Failure modes
Full definitions in Errors; the concept page covers
the status machine and the
money-safety rules behind these codes.