@rozoai/checkout 0.1.15 → 0.1.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -120,6 +120,22 @@ Distributing this CLI? `--utm-source <label>` (or `ROZO_CHECKOUT_UTM_SOURCE`) is
120
120
 
121
121
  Want ROZO to be able to reach you if a payment needs attention? Add the optional `--email you@example.com` to `pay`.
122
122
 
123
+ ### Privacy: anonymous install id
124
+
125
+ Every order this CLI creates carries two optional reporting fields in
126
+ `attribution`, so repeat orders from one install can be counted as one payer:
127
+
128
+ - `install_id`: a random UUID v4 made on first run and stored in
129
+ `~/.rozo-checkout/prefs.json` (mode 0600). It is not derived from your
130
+ machine, wallet or anything else about you.
131
+ - `account_hash`: sent only if `OPENROUTER_API_KEY` is set in your
132
+ environment. It is the lowercase hex sha256 of `"rozo-acct-v1:" + key`. The
133
+ key itself is never sent, logged or written to disk. An OpenRouter account id
134
+ is never used for this, because a hash of a short id could be guessed back.
135
+
136
+ Delete `~/.rozo-checkout/prefs.json` to get a new id (it also forgets your last
137
+ wallet and coin). Set `ROZO_CHECKOUT_ANON_ID=off` to send neither field.
138
+
123
139
  Need help? Email hi@rozo.ai, or reach us on [X](https://x.com/ROZOai) or [Discord](https://discord.gg/EfWejgTbuU).
124
140
 
125
141
  <details>
@@ -430,7 +446,37 @@ rozo-checkout status <rozoPaymentId> --watch --timeout 900 --json # poll every
430
446
  ```
431
447
 
432
448
  Exit 0 means the check itself ran cleanly, not that the invoice settled:
433
- `expired_unfunded` also exits 0. Always read `state`.
449
+ `expired_unfunded` also exits 0. Always read `state`, or the simpler
450
+ `paymentOutcome` and `nextAction` fields.
451
+
452
+ For a yes/no answer, use `receipt`. It exits 0 only when Coinbase itself
453
+ reports the invoice paid (v3 `CAPTURE_SUCCEEDED`), 3 while the payment is in
454
+ flight or unknown, and 1 if the order expired unpaid or needs a human:
455
+
456
+ ```bash
457
+ rozo-checkout receipt <rozoPaymentId> --json | jq '.receipt | .paymentOutcome, .merchantSettlement.status'
458
+ ```
459
+
460
+ Closed the terminal before paying? `resume` picks the order back up without
461
+ creating a new one:
462
+
463
+ ```bash
464
+ rozo-checkout resume <rozoPaymentId> # asks before showing the address
465
+ rozo-checkout resume <rozoPaymentId> --yes # non-interactive
466
+ ```
467
+
468
+ If the order is still unpaid and has enough time left, it prints the hosted pay
469
+ page and (after you confirm) the exact deposit instructions again. A paid order
470
+ is reported as paid (exit 0); an expired one exits 1 and says how to start
471
+ over; it refuses if this machine already recorded a send. Nothing is created or
472
+ sent.
473
+
474
+ It reports your payment, the merchant invoice and service delivery as separate
475
+ layers. Delivery is always `unknown`: Rozo cannot see your OpenRouter credits.
476
+
477
+ With `--send`, the wallet must also hold the chain's fee coin (ETH, BNB, POL or
478
+ SOL). If it does not, the CLI stops with `INSUFFICIENT_GAS` before signing and
479
+ tells you how much is missing; the order is left untouched.
434
480
 
435
481
  **Retrying without paying twice.** Running `pay` again on the same link does
436
482
  not create a second order while its order is open: you get the same order
@@ -498,6 +544,22 @@ The full list of what this refuses to do, and why, is in
498
544
 
499
545
  ## Changelog
500
546
 
547
+ - **0.1.17**: new `resume <rozoPaymentId>` command: re-shows the pay page and
548
+ deposit instructions for an unpaid order (read-only, same expiry, payability
549
+ and blacklist gates as `pay`), and answers clearly when it is already paid or
550
+ expired. Orders now carry an anonymous `attribution.install_id` and, when
551
+ `OPENROUTER_API_KEY` is set, a salted `attribution.account_hash`; see
552
+ Privacy. `ROZO_CHECKOUT_ANON_ID=off` sends neither.
553
+ - **0.1.16**: new `receipt` command: one read, exit 0 only when the merchant
554
+ side itself reports the invoice paid (Coinbase v3 `CAPTURE_SUCCEEDED`, v1 usage
555
+ count, or the Bitrefill payout), reported as three layers
556
+ (your payment, merchant invoice, service delivery). `status` adds
557
+ `paymentOutcome`, `nextAction` and `sendWindow`; `nextAction.canSend` is the
558
+ only field that permits paying. With `--send`, the wallet's fee coin (ETH,
559
+ BNB, POL, SOL; on Base including the L1 data fee) is checked before signing:
560
+ `INSUFFICIENT_GAS` says how much is missing and leaves the order untouched.
561
+ Transaction hashes this tool reports are no longer masked; anything inside
562
+ error text still is.
501
563
  - **0.1.15**: corrected guidance after an order expires unpaid. First check
502
564
  your own wallet that nothing was sent to the old deposit and no Lightning
503
565
  payment is pending; if nothing was sent, re-run the same `pay` on the same
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rozoai/checkout",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "type": "module",
5
5
  "description": "Pay OpenRouter, or any Coinbase invoice, with the crypto you already hold: USDT/USDC on Solana, BNB Chain, Ethereum or Polygon, USDC on Base or Stellar, or BTC over Lightning. No Coinbase account.",
6
6
  "license": "MIT",