From 391543fa84641c7ac67bcba90f138aeb40b9d912 Mon Sep 17 00:00:00 2001 From: Greg Soucy Date: Thu, 19 Mar 2026 19:50:11 -0400 Subject: [PATCH] Tighten v1.1.0 commercial examples --- checksums.txt | 15 ++-- .../900-authorize.receipt.invalid.json | 4 ++ .../valid/901-authorize.receipt.valid.json | 34 +++++++++ .../valid/901-checkout.receipt.valid.json | 70 +++++++++++++++++++ .../invalid/001-purchase.request.invalid.json | 16 +++-- .../valid/901-purchase.receipt.valid.json | 66 +++++++++++++++++ .../invalid/001-ship.request.invalid.json | 12 +++- .../invalid/900-ship.receipt.invalid.json | 13 +++- .../ship/valid/901-ship.receipt.valid.json | 44 ++++++++++++ .../invalid/900-verify.receipt.invalid.json | 7 +- .../valid/901-verify.receipt.valid.json | 34 +++++++++ 11 files changed, 300 insertions(+), 15 deletions(-) create mode 100644 examples/v1.1.0/commercial/authorize/valid/901-authorize.receipt.valid.json create mode 100644 examples/v1.1.0/commercial/checkout/valid/901-checkout.receipt.valid.json create mode 100644 examples/v1.1.0/commercial/purchase/valid/901-purchase.receipt.valid.json create mode 100644 examples/v1.1.0/commercial/ship/valid/901-ship.receipt.valid.json create mode 100644 examples/v1.1.0/commercial/verify/valid/901-verify.receipt.valid.json diff --git a/checksums.txt b/checksums.txt index 7801145..f9f03f2 100644 --- a/checksums.txt +++ b/checksums.txt @@ -1,23 +1,28 @@ 930cbbb3992d01385c1e5a64a4a04de5bac7c68a8b59a25a6c0e5507a1cea33f examples/v1.1.0/commercial/authorize/invalid/001-authorize.request.invalid.json -235de6956c2ef4b7b42176767ee34c7b913a6e5385ac11bf4ed6050179a430f4 examples/v1.1.0/commercial/authorize/invalid/900-authorize.receipt.invalid.json +ef1e7e77e6c53ef918053918a1b9243505fef02a61b4899868cad36feebe42f3 examples/v1.1.0/commercial/authorize/invalid/900-authorize.receipt.invalid.json afbcee85906d0249ed0c60eecf40657832549ca8032a99154dd0e643b6d82884 examples/v1.1.0/commercial/authorize/valid/001-authorize.request.valid.json c0ca42d7269f82c69cdcb24a0cd19d9bfc0a30cbf9b991e3f82b58c01ac16961 examples/v1.1.0/commercial/authorize/valid/900-authorize.receipt.valid.json +45023d4bb512d36ee2543ffb9d3246a17f13021d7f9a115c79ae87860f391e00 examples/v1.1.0/commercial/authorize/valid/901-authorize.receipt.valid.json dec8708eda1a9da3d3f54731146b2b3cbd292ab718fcc6a763062d83014b4390 examples/v1.1.0/commercial/checkout/invalid/001-checkout.request.invalid.json a6fbf133ce4629ce3831d9a2929bcc5eef1844d5edf97428d20ce897d77e031e examples/v1.1.0/commercial/checkout/invalid/900-checkout.receipt.invalid.json 6607a0a6ceefd0ca978f7969cb1e6e326e9a8ceaedde17505d2be81a260b3c8c examples/v1.1.0/commercial/checkout/valid/001-checkout.request.valid.json f8880c06f91c1d21a617fbe7f2b6a9d41d37db9f4fd5e9998689100c16f4000e examples/v1.1.0/commercial/checkout/valid/900-checkout.receipt.valid.json -1216c111a1c65a5ff80dbbba6394a5062e09aa8c8a6456bd4052109fce392b99 examples/v1.1.0/commercial/purchase/invalid/001-purchase.request.invalid.json +ef376639e6129b14a8444c90e5a46ca4bd87a0b0f3b793e012f4839aa46b84a8 examples/v1.1.0/commercial/checkout/valid/901-checkout.receipt.valid.json +0be8ae75fc24986bdf74f096995712b847a8cced75e33fe18095bca51282b773 examples/v1.1.0/commercial/purchase/invalid/001-purchase.request.invalid.json e70a205a9d6a4ec729161508a02b3d36d69b801408eec5cf54573ddfbbdfd44d examples/v1.1.0/commercial/purchase/invalid/900-purchase.receipt.invalid.json 2b235a6d567127c54da9c6c3eacf915c79a5c5127197a9aadbfb50289b122957 examples/v1.1.0/commercial/purchase/valid/001-purchase.request.valid.json 3dd86d4ca05f8d3488ec1203d451a2f263b8e8eca388a0001850d7867314a187 examples/v1.1.0/commercial/purchase/valid/900-purchase.receipt.valid.json -24e1b4a8d3bb23f2d28c302cce7f20adc94b4561dd7e4bd9e4f28d17ea6657eb examples/v1.1.0/commercial/ship/invalid/001-ship.request.invalid.json -6f8a95a74285969d7ee7170539c9dd050585f13869ad7b1b0579c6fd2b8783cb examples/v1.1.0/commercial/ship/invalid/900-ship.receipt.invalid.json +eeee667d742c165ba4fb08014cbcf9d45b5ee35bcc228764184ffe9a04530545 examples/v1.1.0/commercial/purchase/valid/901-purchase.receipt.valid.json +bee0d3a0329f17125d0c1c287b870880b836cdb35faf8f2b06a820fa91ab6571 examples/v1.1.0/commercial/ship/invalid/001-ship.request.invalid.json +7012d72e9641258bdebe3534e2f0faa771fbce63cb6a8b3c0828e9fe5ec521c5 examples/v1.1.0/commercial/ship/invalid/900-ship.receipt.invalid.json 576924f554079213ce078d4be6c54e5ffc58839bde4182d73d02ba3412e47f3b examples/v1.1.0/commercial/ship/valid/001-ship.request.valid.json a004cb1385b1ca173b89df702e2b52d63f870521652f98f023359d30009b8df0 examples/v1.1.0/commercial/ship/valid/900-ship.receipt.valid.json +f268080d0fadbd2b78ea0ab66348b137a07fe8764066af3337f8c7354335f4c7 examples/v1.1.0/commercial/ship/valid/901-ship.receipt.valid.json a2a5e61fa04e12786a848e03bbabbc3f9d066ca55a6f48cb1ae1140f6373bf94 examples/v1.1.0/commercial/verify/invalid/001-verify.request.invalid.json -e0016f3510bda6efcbdc3984bd077c37160a6a9db039dafa1d602806d8cf6e73 examples/v1.1.0/commercial/verify/invalid/900-verify.receipt.invalid.json +8933801c0b4fc007ead2e57d0a5f8e1a1b8a8b91a5c759e54778f65fff865c11 examples/v1.1.0/commercial/verify/invalid/900-verify.receipt.invalid.json 56d02915471d62f7687e3f6258d75754c8e7a44ca717e4ca0906dd4bb6fc34fb examples/v1.1.0/commercial/verify/valid/001-verify.request.valid.json 50874f3eea69a51ac132873b05e39318e4c2241078ca5e258e466934935ec945 examples/v1.1.0/commercial/verify/valid/900-verify.receipt.valid.json +455d19ad1b7ef98e436d8f1c675fee7f2716eb17d301da8d2cc4e2e2c51e624a examples/v1.1.0/commercial/verify/valid/901-verify.receipt.valid.json 80fa9124c1560d0e55b83554d83581dabf72505cc4d9c1354157f51fddd9686a manifest.json 85070516cccc4f735ca2561c7ea1e7949efee4d7fed10e5ba40abb585c962292 schemas/v1.1.0/commercial/authorize/authorize.receipt.schema.json ef5da55ba5acdd43e8d2715204938762a63819dd370ebc8dfedad014617259c3 schemas/v1.1.0/commercial/authorize/authorize.request.schema.json diff --git a/examples/v1.1.0/commercial/authorize/invalid/900-authorize.receipt.invalid.json b/examples/v1.1.0/commercial/authorize/invalid/900-authorize.receipt.invalid.json index bd5ce74..92d1fd3 100644 --- a/examples/v1.1.0/commercial/authorize/invalid/900-authorize.receipt.invalid.json +++ b/examples/v1.1.0/commercial/authorize/invalid/900-authorize.receipt.invalid.json @@ -21,5 +21,9 @@ "amount": "49.99", "currency": "USDC", "decimals": 2 + }, + "payment_requirement_ref": { + "type": "payment_requirement", + "id": "x402-auth-001" } } diff --git a/examples/v1.1.0/commercial/authorize/valid/901-authorize.receipt.valid.json b/examples/v1.1.0/commercial/authorize/valid/901-authorize.receipt.valid.json new file mode 100644 index 0000000..51eb4cd --- /dev/null +++ b/examples/v1.1.0/commercial/authorize/valid/901-authorize.receipt.valid.json @@ -0,0 +1,34 @@ +{ + "protocol": "commercial", + "version": "1.1.0", + "verb": "authorize", + "receipt_id": "authrcpt-002", + "issued_at": "2026-03-19T10:04:10Z", + "request_id": "authreq-002", + "status": "denied", + "payer": { + "role": "payer", + "id": "buyer-007", + "kind": "account" + }, + "payee": { + "role": "payee", + "id": "merchant-settlement", + "kind": "wallet" + }, + "merchant": { + "role": "merchant", + "id": "merchant.example", + "kind": "organization" + }, + "amount": { + "amount": "199.00", + "currency": "USDC", + "decimals": 2 + }, + "order_ref": { + "type": "order", + "id": "ord-1002" + }, + "reason": "Issuer risk controls require a fresh buyer challenge before approval." +} diff --git a/examples/v1.1.0/commercial/checkout/valid/901-checkout.receipt.valid.json b/examples/v1.1.0/commercial/checkout/valid/901-checkout.receipt.valid.json new file mode 100644 index 0000000..c7a8d94 --- /dev/null +++ b/examples/v1.1.0/commercial/checkout/valid/901-checkout.receipt.valid.json @@ -0,0 +1,70 @@ +{ + "protocol": "commercial", + "version": "1.1.0", + "verb": "checkout", + "receipt_id": "checkoutrcpt-002", + "issued_at": "2026-03-19T10:07:11Z", + "request_id": "checkoutreq-002", + "status": "pending", + "payer": { + "role": "payer", + "id": "buyer-019", + "kind": "account" + }, + "merchant": { + "role": "merchant", + "id": "merchant.example", + "kind": "organization" + }, + "payee": { + "role": "payee", + "id": "merchant-settlement", + "kind": "wallet" + }, + "order_ref": { + "type": "order", + "id": "ord-1019" + }, + "invoice_ref": { + "type": "invoice", + "id": "inv-1019" + }, + "settlement": { + "status": "pending", + "method": "x402", + "settlement_ref": "settle-1019", + "amount": { + "amount": "88.40", + "currency": "USDC", + "decimals": 2 + } + }, + "amount_breakdown": { + "subtotal": { + "amount": "79.00", + "currency": "USDC", + "decimals": 2 + }, + "tax": { + "amount": "4.40", + "currency": "USDC", + "decimals": 2 + }, + "shipping": { + "amount": "5.00", + "currency": "USDC", + "decimals": 2 + }, + "total": { + "amount": "88.40", + "currency": "USDC", + "decimals": 2 + } + }, + "fulfillment_ref": { + "type": "fulfillment", + "id": "fulfill-1019", + "uri": "https://merchant.example/fulfillment/fulfill-1019" + }, + "reason": "Authorization is accepted, but on-chain capture is waiting for the next settlement batch." +} diff --git a/examples/v1.1.0/commercial/purchase/invalid/001-purchase.request.invalid.json b/examples/v1.1.0/commercial/purchase/invalid/001-purchase.request.invalid.json index fcb55c0..6ad616e 100644 --- a/examples/v1.1.0/commercial/purchase/invalid/001-purchase.request.invalid.json +++ b/examples/v1.1.0/commercial/purchase/invalid/001-purchase.request.invalid.json @@ -21,19 +21,27 @@ "quantity": 0, "unit_price": { "amount": "12.50", - "currency": "USDC" + "currency": "USDC", + "decimals": 2 } } ], "amount_breakdown": { "subtotal": { "amount": "12.50", - "currency": "USDC" + "currency": "USDC", + "decimals": 2 }, "total": { "amount": "12.50", - "currency": "USDC" + "currency": "USDC", + "decimals": 2 } }, - "payment_input": {} + "payment_input": { + "payment_requirement_ref": { + "type": "payment_requirement", + "id": "x402-req-2001" + } + } } diff --git a/examples/v1.1.0/commercial/purchase/valid/901-purchase.receipt.valid.json b/examples/v1.1.0/commercial/purchase/valid/901-purchase.receipt.valid.json new file mode 100644 index 0000000..8ae46c9 --- /dev/null +++ b/examples/v1.1.0/commercial/purchase/valid/901-purchase.receipt.valid.json @@ -0,0 +1,66 @@ +{ + "protocol": "commercial", + "version": "1.1.0", + "verb": "purchase", + "receipt_id": "purchasercpt-002", + "issued_at": "2026-03-19T10:14:21Z", + "request_id": "purchasereq-002", + "status": "pending", + "purchase_id": "purchase-002", + "payer": { + "role": "payer", + "id": "buyer-044", + "kind": "account" + }, + "merchant": { + "role": "merchant", + "id": "merchant.example", + "kind": "organization" + }, + "payee": { + "role": "payee", + "id": "merchant-settlement", + "kind": "wallet" + }, + "provider": { + "role": "provider", + "id": "runtime.commandlayer", + "kind": "service" + }, + "amount_breakdown": { + "subtotal": { + "amount": "250.00", + "currency": "USDC", + "decimals": 2 + }, + "fees": { + "amount": "5.00", + "currency": "USDC", + "decimals": 2 + }, + "total": { + "amount": "255.00", + "currency": "USDC", + "decimals": 2 + } + }, + "order_ref": { + "type": "order", + "id": "ord-2044" + }, + "invoice_ref": { + "type": "invoice", + "id": "inv-2044" + }, + "settlement": { + "status": "pending", + "method": "x402", + "settlement_ref": "settle-2044", + "amount": { + "amount": "255.00", + "currency": "USDC", + "decimals": 2 + } + }, + "reason": "Delegated provider accepted the purchase, but the settlement proof will be emitted after batched capture finalizes." +} diff --git a/examples/v1.1.0/commercial/ship/invalid/001-ship.request.invalid.json b/examples/v1.1.0/commercial/ship/invalid/001-ship.request.invalid.json index 02124da..efa02b8 100644 --- a/examples/v1.1.0/commercial/ship/invalid/001-ship.request.invalid.json +++ b/examples/v1.1.0/commercial/ship/invalid/001-ship.request.invalid.json @@ -11,7 +11,8 @@ }, "payer": { "role": "payer", - "id": "buyer-001" + "id": "buyer-001", + "kind": "account" }, "provider": { "role": "provider", @@ -27,10 +28,15 @@ "id": "auth-3001" }, "fulfillment_ref": { - "type": "receipt", + "type": "fulfillment", "id": "fulfillment-3001" }, - "items": [], + "items": [ + { + "sku": "device-001", + "quantity": 1 + } + ], "destination": { "country_code": "US", "postal_code": "10001", diff --git a/examples/v1.1.0/commercial/ship/invalid/900-ship.receipt.invalid.json b/examples/v1.1.0/commercial/ship/invalid/900-ship.receipt.invalid.json index 0d47bd6..0c394da 100644 --- a/examples/v1.1.0/commercial/ship/invalid/900-ship.receipt.invalid.json +++ b/examples/v1.1.0/commercial/ship/invalid/900-ship.receipt.invalid.json @@ -14,7 +14,13 @@ }, "payer": { "role": "payer", - "id": "buyer-001" + "id": "buyer-001", + "kind": "account" + }, + "carrier": { + "role": "carrier", + "id": "ups", + "kind": "service" }, "order_ref": { "type": "order", @@ -28,5 +34,8 @@ "type": "fulfillment", "id": "fulfillment-3001" }, - "event_at": "2026-03-19T10:15:05Z" + "tracking_number": "1Z999AA10123456784", + "tracking_url": "https://carrier.example/track/1Z999AA10123456784", + "event_at": "2026-03-19T10:15:05Z", + "delivered_at": "2026-03-19T10:15:05Z" } diff --git a/examples/v1.1.0/commercial/ship/valid/901-ship.receipt.valid.json b/examples/v1.1.0/commercial/ship/valid/901-ship.receipt.valid.json new file mode 100644 index 0000000..b2b892b --- /dev/null +++ b/examples/v1.1.0/commercial/ship/valid/901-ship.receipt.valid.json @@ -0,0 +1,44 @@ +{ + "protocol": "commercial", + "version": "1.1.0", + "verb": "ship", + "receipt_id": "shiprcpt-002", + "issued_at": "2026-03-19T10:17:45Z", + "request_id": "shipreq-002", + "status": "in_transit", + "shipment_id": "shipment-002", + "merchant": { + "role": "merchant", + "id": "merchant.example", + "kind": "organization" + }, + "payer": { + "role": "payer", + "id": "buyer-017", + "kind": "account" + }, + "carrier": { + "role": "carrier", + "id": "dhl-express", + "kind": "service" + }, + "order_ref": { + "type": "order", + "id": "ord-3017" + }, + "commercial_ref": { + "type": "checkout", + "id": "checkout-3017" + }, + "fulfillment_ref": { + "type": "fulfillment", + "id": "fulfillment-3017" + }, + "payment_ref": { + "type": "payment_proof", + "id": "proof-3017" + }, + "tracking_number": "JD014600006838220004", + "tracking_url": "https://carrier.example/track/JD014600006838220004", + "event_at": "2026-03-19T10:17:45Z" +} diff --git a/examples/v1.1.0/commercial/verify/invalid/900-verify.receipt.invalid.json b/examples/v1.1.0/commercial/verify/invalid/900-verify.receipt.invalid.json index 09ae31f..e704a2b 100644 --- a/examples/v1.1.0/commercial/verify/invalid/900-verify.receipt.invalid.json +++ b/examples/v1.1.0/commercial/verify/invalid/900-verify.receipt.invalid.json @@ -6,6 +6,11 @@ "issued_at": "2026-03-19T10:20:02Z", "request_id": "verifyreq-001", "status": "not_verified", + "verifier": { + "role": "verifier", + "id": "ledger.example", + "kind": "service" + }, "target_type": "settlement", "target_ref": { "type": "settlement", @@ -17,5 +22,5 @@ "id": "proof-2001" } ], - "basis": "Missing reason should fail." + "basis": "Canonical settlement proof was found, but the ledger amount did not reconcile." } diff --git a/examples/v1.1.0/commercial/verify/valid/901-verify.receipt.valid.json b/examples/v1.1.0/commercial/verify/valid/901-verify.receipt.valid.json new file mode 100644 index 0000000..3e9d14c --- /dev/null +++ b/examples/v1.1.0/commercial/verify/valid/901-verify.receipt.valid.json @@ -0,0 +1,34 @@ +{ + "protocol": "commercial", + "version": "1.1.0", + "verb": "verify", + "receipt_id": "verifyrcpt-002", + "issued_at": "2026-03-19T10:22:08Z", + "request_id": "verifyreq-002", + "status": "inconclusive", + "verifier": { + "role": "verifier", + "id": "ledger.example", + "kind": "service" + }, + "target_type": "fulfillment", + "target_ref": { + "type": "fulfillment", + "id": "fulfill-3017", + "uri": "https://merchant.example/fulfillment/fulfill-3017" + }, + "evidence_refs": [ + { + "type": "shipment", + "id": "shipment-002", + "uri": "https://carrier.example/shipments/shipment-002" + }, + { + "type": "receipt", + "id": "delivery-scan-pending-3017", + "uri": "https://carrier.example/proof/delivery-scan-pending-3017" + } + ], + "basis": "Carrier telemetry confirms handoff, but no signed delivery proof is yet available from the downstream carrier.", + "reason": "Verification remains inconclusive until the carrier publishes final delivery evidence." +}