This document gives an in depth overview of the receipt that is issued on purchase and the intent of the schema design.
Storefront Signature
storefrontSig is the field that ties a receipt to the purchase it records. When a checkout completes, the storefront signs a summary of the sale with its private key. The summary covers who bought what, under which listing and license, and when. Anyone can later check that summary against the storefront’s public key.
The signed payload is seven values joined by colons, always in this order:
purchasedAt:payment.ref:purchasedGood.uri:listing.cid:buyerDid:licenseGrant.cid:grantedItemsDigestpurchasedAt- When the purchase was completedpayment.ref- The payment that settled itpurchasedGood.uri- The item or product that was boughtlisting.cid- The exact version of the listing, including its price, at checkoutbuyerDid- The buyer’s accountlicenseGrant.cid- The exact license terms in effect at the time of salegrantedItemsDigest- The exact set of items the buyer is entitled to download
All seven values are always present. If a receipt is missing any of them, the payload can’t be rebuilt and the receipt won’t verify.
What the signature proves
A valid signature shows that the storefront named in storefrontDid issued this receipt and that none of the signed values have changed since. In practice:
The price can’t be swapped. The listing CID points to one specific version of the listing.
The license can’t be rewritten. The terms the buyer agreed to are frozen with the purchase. If the merchant edits the license later, existing receipts aren’t affected.
What the buyer owns can’t grow or shrink. For a product, the granted items are its members at the time of sale. Items the merchant adds later aren’t included, and items they remove stay downloadable for this buyer.
The Fields
Storefront Identifiers
storefrontDid: The Bazaar service instance that issued and signed the receipt. The verifier's trust anchorkid: Optional hint naming which storefront key signed the receipt. Verifiers fall back to trying every non-revoked key if it is missing or doesn't matchmerchantDid: The ATProto identity whose catalog the purchased good belongs to. Does not sign the receipt
Purchase Contents
listing: The listing purchased. Its cid pins the exact listing version at checkout and is the immutable price anchorpurchasedGood: The catalog.item or catalog.product that was boughtpurchasedAt: RFC 3339 timestamp of when the receipt was mintedgrantedItems: The exact catalog.item refs this purchase entitles the buyer to download, frozen at checkoutlicenseGrant: The license.terms in force at purchase.uripoints to the record;cidpins the exact version the buyer purchased under
Payment Info
pricePaid: Amount in the smallest currency unit (cents), currency as an ISO 4217 codepaymentProcessor: The payment processor (e.g. "stripe")paymentRef: The processor's reference for the payment (e.g. a Stripe PaymentIntent ID)
Validation
storefrontSig: Base64url signature over the seven-field payload below.
purchasedAt : payment.ref : purchasedGood.uri : listing.cid : buyerDid : licenseGrant.cid : grantedItemsDigestExample Receipt issued to a buyer
{
"kid": "storefront-key-2026-04-05",
"$type": "diamonds.whereditgo.bazaar.purchase.receipt",
"listing": {
"cid": "bafyreiekwiy6mrpg2pabb55omzhchf4kzrv7hq25jjguswgrrsufrb6x7i",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.listing/3mveloprvm72k"
},
"payment": {
"ref": "pi_3UF3XpJdLJdWGoqN1nmWQZjR",
"processor": "stripe"
},
"pricePaid": {
"amount": 999,
"currency": "USD"
},
"merchantDid": "did:plc:co4ksmjika6tzep35uqhabtd",
"purchasedAt": "2026-09-13T02:53:30.630Z",
"grantedItems": [
{
"cid": "bafyreif2qhhzq3nn6t76pzaijypbx77ioiplbshadmfk5tp4f7hhhxgpj4",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4ln3f2y"
},
{
"cid": "bafyreiaiihhvqqsvkgely3x7bwprtqjhnfrvek43fciavutxlaprkxdd5m",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4mipw2w"
},
{
"cid": "bafyreidwoszvnusz2mlsu5xu2lgvbd7aobpcdfzvdcvxlokbkiftp2zj5e",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4ndtj2g"
},
{
"cid": "bafyreidhgmqp2zzum4xmkh4nzjmbcgctqsrdnc6lzyuzqdpvbmqthp6k2q",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4o7si25"
},
{
"cid": "bafyreib4chrfqf2dolnpqeopep3nix3schhzhmg4d5mc57qpcgx556jpeq",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4oy2u2d"
},
{
"cid": "bafyreign5ctouknxp4q5u2nm3qfypquzgkmrznvvf6wzv4glncwywyyeli",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4pzel2z"
},
{
"cid": "bafyreigjjucowxx2tfnys4u2v66wfm2p3oiwbo6vzbchinrmwg3dbmnl7m",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4qql62g"
},
{
"cid": "bafyreienvbunlyfqzneak7soqztwrwzcbvmaywa3th7hobxlb3nthxjpy4",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4rinp2m"
},
{
"cid": "bafyreifyklqz6dbtytbgc6vamjjsm4qarsxou37spe2v7qahiv7fxctble",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4sfkl22"
},
{
"cid": "bafyreigreqyhdcsbogmdkcsi67gp2oh4l244bxkdgilvmz5whkmawudemm",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.item/3mvele4t4n62w"
}
],
"licenseGrant": {
"cid": "bafyreicowi54pilzxfdhv5efvznpf7uliny4zt4ldpggt2qqdagle4d3k4",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.license.terms/3mtmzpd2mr52k"
},
"purchasedGood": {
"cid": "bafyreie7m5ar5n5frtiaijbxgexrwpofr23v6x3x7xntkdue7ugnxrdy2a",
"uri": "at://did:plc:co4ksmjika6tzep35uqhabtd/diamonds.whereditgo.bazaar.catalog.product/3mvelctyfms2q"
},
"storefrontDid": "did:web:bazaar.whereditgo.diamonds",
"storefrontSig": "--T3n6F009ZPs-Gobn_GEXfzOF0BF-DypJGD2hEgcysHyQeylWFB61nn60acT4531yHjoNNkBoolacdATkwJMw"
}