@rozoai/checkout 0.1.0

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Rozo AI
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,192 @@
1
+ # Inicio rápido
2
+
3
+ [English](QUICKSTART.md) | [简体中文](QUICKSTART.zh.md) | [日本語](QUICKSTART.ja.md) | **Español**
4
+
5
+ Pagar un enlace de pago de Coinbase (Coinbase Payment Link) de OpenRouter con
6
+ USDT/USDC en Solana, BNB Chain, Ethereum, Polygon, Base o Stellar, o con BTC por
7
+ Lightning. Cinco minutos. Para saber cómo funciona y por qué, ver
8
+ [README.md](README.md).
9
+
10
+ ## El comando de una sola línea
11
+
12
+ ```bash
13
+ npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID --with usdt-solana
14
+ ```
15
+
16
+ Eso ejecuta por uno todos los pasos de abajo: cotizar, crear, revisar, confirmar,
17
+ instrucciones de depósito y luego consultar hasta la liquidación. Monedas para
18
+ `--with`: `usdt-solana`, `usdc-solana`, `usdt-bnb`, `usdc-bnb`, `usdt-ethereum`,
19
+ `usdc-ethereum`, `usdt-polygon`, `usdc-polygon`, `usdc-base`, `usdc-stellar`,
20
+ `btc-lightning`.
21
+
22
+ Añadir `--send` para pagar desde una billetera caliente en lugar de la propia, y
23
+ `--json` para obtener una salida legible por máquina.
24
+
25
+ El resto de esta página es el mismo flujo ejecutado paso a paso, que es lo que
26
+ conviene si algo sale mal o si se quiere automatizar por cuenta propia.
27
+
28
+ ## Antes de empezar
29
+
30
+ - **Node 18 o posterior** (`node -v`). No hay nada más que instalar: `npx`
31
+ descarga la CLI, y los `scripts/dist/*.js` del repositorio clonado son
32
+ paquetes autocontenidos.
33
+ - **Una billetera** que tenga la moneda con la que se quiere pagar, en la cadena elegida.
34
+ - **El enlace de Coinbase**, por ejemplo
35
+ `https://payments.coinbase.com/payment-links/pl_01YOURLINKID`.
36
+ - Sin cuenta y sin clave de API. Todos los endpoints de aquí son públicos.
37
+
38
+ Definirlo una sola vez:
39
+
40
+ ```bash
41
+ LINK="https://payments.coinbase.com/payment-links/pl_01YOURLINKID"
42
+ ```
43
+
44
+ Ids de cadena: `1` Ethereum · `56` BNB Chain · `137` Polygon · `8453` Base ·
45
+ `900` Solana · `1500` Stellar · `lightning` Bitcoin Lightning.
46
+
47
+ ## 1. Cotizarlo (solo lectura, gratis)
48
+
49
+ ```bash
50
+ node scripts/dist/quote.js --url "$LINK"
51
+ ```
52
+
53
+ ```json
54
+ {
55
+ "success": true,
56
+ "merchant": "OpenRouter, Inc.",
57
+ "invoice": { "amount": "5.00", "fiat": { "amount": "5.00", "currency": "USD" } },
58
+ "callerPays": "5.00",
59
+ "coinbaseExpiryIso": "2026-08-09T10:00:00.000Z"
60
+ }
61
+ ```
62
+
63
+ Un `"success": false` con `LINK_NO_LONGER_PAYABLE` significa que el enlace ya
64
+ está usado o expirado: pedir uno nuevo y detenerse.
65
+
66
+ ## 2. Crear la orden
67
+
68
+ ```bash
69
+ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT
70
+ ```
71
+
72
+ No se mueve dinero, y una orden sin fondear simplemente expira. La dirección de
73
+ depósito (deposit address) completa se **retiene** en esta etapa: se obtiene un
74
+ resumen enmascarado para revisarlo primero.
75
+
76
+ ```json
77
+ {
78
+ "success": true,
79
+ "rozoPaymentId": "11111111-2222-4333-8444-555555555555",
80
+ "invoice": { "amount": "5.000000", "currency": "USD" },
81
+ "deposit": null,
82
+ "depositWithheld": true,
83
+ "display": {
84
+ "chain": "Solana",
85
+ "amount": "5.021000 USDT",
86
+ "payToMasked": "9WzDXw...AWWM",
87
+ "memoRequirement": "This deposit REQUIRES the memo/tag below. ..."
88
+ },
89
+ "expiry": { "effectiveDeadlineIso": "2026-08-08T11:00:00.000Z", "minutesOfSlack": 55 }
90
+ }
91
+ ```
92
+
93
+ **Revisar `display.amount` antes de continuar.** Normalmente es mayor que la
94
+ factura: incluye las comisiones del puente (bridge) y de la red. Anotar el
95
+ `rozoPaymentId`; todos los comandos posteriores lo usan.
96
+
97
+ ## 3. Confirmar
98
+
99
+ Solo una vez que se ha decidido pagar, volver a ejecutar el mismo comando con `--confirm`:
100
+
101
+ ```bash
102
+ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT --confirm
103
+ ```
104
+
105
+ Esto libera el detalle completo del depósito y registra la confirmación que
106
+ exigen los scripts de envío.
107
+
108
+ ```json
109
+ {
110
+ "success": true,
111
+ "confirmed": true,
112
+ "deposit": {
113
+ "chain": "Solana",
114
+ "tokenSymbol": "USDT",
115
+ "receiverAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
116
+ "receiverMemo": "rozo-901",
117
+ "amount": "5.021000",
118
+ "payTo": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
119
+ }
120
+ }
121
+ ```
122
+
123
+ Para Lightning, `deposit.lnInvoice` contiene la cadena BOLT11 que hay que
124
+ escanear, y `deposit.amount` está en satoshis.
125
+
126
+ ## 4. Pagar
127
+
128
+ Elegir uno. **Modo A** — pagar desde la propia billetera: enviar exactamente
129
+ `deposit.amount` de `deposit.tokenSymbol` a `deposit.receiverAddress`, en
130
+ `deposit.chain`, incluyendo `deposit.receiverMemo` si lo hay. Copiar la
131
+ dirección del JSON; nunca teclearla de nuevo.
132
+
133
+ **Modo B** — dejar que el script pague desde una billetera caliente (solo EVM y Solana):
134
+
135
+ ```bash
136
+ # Previsualizar exactamente lo que se firmaría — no firma nada
137
+ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
138
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --dry-run
139
+
140
+ # Enviar de verdad. --send es obligatorio.
141
+ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
142
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --send
143
+ ```
144
+
145
+ Usar `send-evm.js` con `ROZO_CHECKOUT_EVM_KEY` para Ethereum, BNB Chain,
146
+ Polygon y Base. Topes: $100 por transacción, $200 por sesión.
147
+
148
+ ```json
149
+ {
150
+ "success": true,
151
+ "submitted": true,
152
+ "confirmed": true,
153
+ "txHash": "3Bxs4h24hBjHziQ8UJqSjqjbjWQq2sQ3yV9Fq4HrVh5c"
154
+ }
155
+ ```
156
+
157
+ ## 5. Observar la liquidación
158
+
159
+ ```bash
160
+ node scripts/dist/status.js --rozo-payment-id <rozoPaymentId> --watch --timeout 600
161
+ ```
162
+
163
+ ```json
164
+ {
165
+ "success": true,
166
+ "state": "settled",
167
+ "terminal": true,
168
+ "payin": { "txHash": "3Bxs4h24...", "confirmedAt": "2026-08-08T10:05:00.000Z" }
169
+ }
170
+ ```
171
+
172
+ Los estados van `awaiting_deposit` → `payin_detected` → `payin_confirmed` →
173
+ `bridging` → `paying_coinbase` → `settled`. Que la transacción on-chain se
174
+ confirme no es el final: seguir consultando hasta `settled`.
175
+
176
+ ## Si algo sale mal
177
+
178
+ Leer `error.code`. Los tres con los que es más probable toparse:
179
+
180
+ | `error.code` | Qué ocurrió | Qué hacer |
181
+ |---|---|---|
182
+ | `LINK_NO_LONGER_PAYABLE` | alguien ya pagó el enlace, o expiró | pedir al comercio un enlace nuevo; no pagar nada |
183
+ | `EXPIRY_MARGIN` | queda muy poco tiempo para fondear, puentear y liquidar de forma segura | dejar que la orden expire y volver a empezar desde el paso 1 |
184
+ | `ALREADY_SENT` | ya hay un envío registrado para esta orden | **no** enviar de nuevo; ejecutar `status.js` y revisar primero la cadena |
185
+
186
+ **Si algo de dinero ya salió de la billetera, nunca pagar de nuevo.** Conservar
187
+ el `linkId`, el `rozoPaymentId` y todos los hashes de transacción, y pedir a una
188
+ persona que lo concilie. No hay garantía de que un segundo pago a una dirección
189
+ de depósito de un solo uso sea acreditado.
190
+
191
+ La tabla completa de errores está en [README.md](README.md), y las instrucciones
192
+ dirigidas al agente están en [SKILL.md](SKILL.md).
@@ -0,0 +1,187 @@
1
+ # クイックスタート
2
+
3
+ [English](QUICKSTART.md) | [简体中文](QUICKSTART.zh.md) | **日本語** | [Español](QUICKSTART.es.md)
4
+
5
+ OpenRouter の Coinbase 決済リンク (Payment Link) を、Solana、BNB Chain、
6
+ Ethereum、Polygon、Base、Stellar 上の USDT/USDC、または Lightning 経由の BTC で支払います。所要 5 分。
7
+ 仕組みと設計意図については [README.md](README.md) を参照してください。
8
+
9
+ ## ワンライナー
10
+
11
+ ```bash
12
+ npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID --with usdt-solana
13
+ ```
14
+
15
+ これ 1 つで、以下の全ステップを実行します。見積もり、注文作成、確認、承認、入金手順の
16
+ 表示、そして決済完了までのポーリングです。`--with` に指定できる通貨: `usdt-solana`、
17
+ `usdc-solana`、`usdt-bnb`、`usdc-bnb`、`usdt-ethereum`、`usdc-ethereum`、
18
+ `usdt-polygon`、`usdc-polygon`、`usdc-base`、`usdc-stellar`、`btc-lightning`。
19
+
20
+ 自分のウォレットではなくホットウォレットから支払う場合は `--send` を、機械可読な出力が
21
+ 必要な場合は `--json` を追加してください。
22
+
23
+ このページの残りは、同じフローを 1 ステップずつ実行するものです。うまくいかないときや、
24
+ 自分でスクリプトを書くときは、こちらが必要になります。
25
+
26
+ ## 始める前に
27
+
28
+ - **Node 18 以降**(`node -v`)。ほかにインストールするものはありません — `npx` が CLI を
29
+ 取得しますし、クローンした `scripts/dist/*.js` は自己完結型のバンドルです。
30
+ - 選んだチェーン上で、支払いたい通貨を保有している**ウォレット**。
31
+ - **Coinbase のリンク**。例:
32
+ `https://payments.coinbase.com/payment-links/pl_01YOURLINKID`。
33
+ - アカウントも API キーも不要です。ここで使うエンドポイントはすべて公開です。
34
+
35
+ 最初に一度だけ設定します:
36
+
37
+ ```bash
38
+ LINK="https://payments.coinbase.com/payment-links/pl_01YOURLINKID"
39
+ ```
40
+
41
+ チェーン id: `1` Ethereum · `56` BNB Chain · `137` Polygon · `8453` Base ·
42
+ `900` Solana · `1500` Stellar · `lightning` Bitcoin Lightning。
43
+
44
+ ## 1. 見積もりを取得する(読み取り専用、無料)
45
+
46
+ ```bash
47
+ node scripts/dist/quote.js --url "$LINK"
48
+ ```
49
+
50
+ ```json
51
+ {
52
+ "success": true,
53
+ "merchant": "OpenRouter, Inc.",
54
+ "invoice": { "amount": "5.00", "fiat": { "amount": "5.00", "currency": "USD" } },
55
+ "callerPays": "5.00",
56
+ "coinbaseExpiryIso": "2026-08-09T10:00:00.000Z"
57
+ }
58
+ ```
59
+
60
+ `"success": false` かつ `LINK_NO_LONGER_PAYABLE` の場合、そのリンクは使用済みか
61
+ 期限切れです — 新しいリンクを依頼し、そこで中止してください。
62
+
63
+ ## 2. 注文を作成する
64
+
65
+ ```bash
66
+ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT
67
+ ```
68
+
69
+ 資金は動かず、入金のない注文はそのまま期限切れになります。この段階では完全な
70
+ 入金アドレス (deposit address) は**伏せられます** — まず確認用にマスクされたサマリーが返ります。
71
+
72
+ ```json
73
+ {
74
+ "success": true,
75
+ "rozoPaymentId": "11111111-2222-4333-8444-555555555555",
76
+ "invoice": { "amount": "5.000000", "currency": "USD" },
77
+ "deposit": null,
78
+ "depositWithheld": true,
79
+ "display": {
80
+ "chain": "Solana",
81
+ "amount": "5.021000 USDT",
82
+ "payToMasked": "9WzDXw...AWWM",
83
+ "memoRequirement": "This deposit REQUIRES the memo/tag below. ..."
84
+ },
85
+ "expiry": { "effectiveDeadlineIso": "2026-08-08T11:00:00.000Z", "minutesOfSlack": 55 }
86
+ }
87
+ ```
88
+
89
+ **先へ進む前に必ず `display.amount` を確認してください。** 通常はインボイス金額より
90
+ 大きくなります — ブリッジ (bridge) 手数料とネットワーク手数料が含まれるためです。`rozoPaymentId` を
91
+ 控えておいてください。以降のコマンドはすべてこれを使います。
92
+
93
+ ## 3. 確認する
94
+
95
+ 支払うと決めたときにだけ、同じコマンドを `--confirm` 付きで実行し直してください:
96
+
97
+ ```bash
98
+ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT --confirm
99
+ ```
100
+
101
+ これで完全な入金詳細が開示され、送金スクリプトが要求する確認記録が残ります。
102
+
103
+ ```json
104
+ {
105
+ "success": true,
106
+ "confirmed": true,
107
+ "deposit": {
108
+ "chain": "Solana",
109
+ "tokenSymbol": "USDT",
110
+ "receiverAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
111
+ "receiverMemo": "rozo-901",
112
+ "amount": "5.021000",
113
+ "payTo": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
114
+ }
115
+ }
116
+ ```
117
+
118
+ Lightning の場合、`deposit.lnInvoice` にスキャン用の BOLT11 文字列が入り、
119
+ `deposit.amount` は satoshi 単位になります。
120
+
121
+ ## 4. 支払う
122
+
123
+ どちらか一方を選びます。**モード A** — 自分のウォレットから支払う: `deposit.chain` 上で、
124
+ `deposit.tokenSymbol` をちょうど `deposit.amount` だけ `deposit.receiverAddress` へ送金します。
125
+ `deposit.receiverMemo` がある場合はそれも付けてください。アドレスは JSON から
126
+ コピーしてください。決して手入力し直さないでください。
127
+
128
+ **モード B** — スクリプトにホットウォレットから支払わせる(EVM と Solana のみ):
129
+
130
+ ```bash
131
+ # 署名される内容を正確にプレビューします — 署名は一切行いません
132
+ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
133
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --dry-run
134
+
135
+ # 実際に送金します。--send は必須です。
136
+ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
137
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --send
138
+ ```
139
+
140
+ Ethereum、BNB Chain、Polygon、Base では `send-evm.js` を `ROZO_CHECKOUT_EVM_KEY` と
141
+ 併せて使います。上限: トランザクションごとに $100、セッションごとに $200。
142
+
143
+ ```json
144
+ {
145
+ "success": true,
146
+ "submitted": true,
147
+ "confirmed": true,
148
+ "txHash": "3Bxs4h24hBjHziQ8UJqSjqjbjWQq2sQ3yV9Fq4HrVh5c"
149
+ }
150
+ ```
151
+
152
+ ## 5. 決済完了を監視する
153
+
154
+ ```bash
155
+ node scripts/dist/status.js --rozo-payment-id <rozoPaymentId> --watch --timeout 600
156
+ ```
157
+
158
+ ```json
159
+ {
160
+ "success": true,
161
+ "state": "settled",
162
+ "terminal": true,
163
+ "payin": { "txHash": "3Bxs4h24...", "confirmedAt": "2026-08-08T10:05:00.000Z" }
164
+ }
165
+ ```
166
+
167
+ 状態は `awaiting_deposit` → `payin_detected` → `payin_confirmed` →
168
+ `bridging` → `paying_coinbase` → `settled` と遷移します。オンチェーンの
169
+ トランザクションが確認されても終わりではありません: `settled` になるまでポーリングを続けてください。
170
+
171
+ ## うまくいかないとき
172
+
173
+ `error.code` を読んでください。遭遇しやすいのは次の 3 つです:
174
+
175
+ | `error.code` | 何が起きたか | どうするか |
176
+ |---|---|---|
177
+ | `LINK_NO_LONGER_PAYABLE` | そのリンクは既に誰かが支払ったか、期限切れです | 加盟店に新しいリンクを依頼してください。何も支払わないこと |
178
+ | `EXPIRY_MARGIN` | 入金・ブリッジ・決済完了を安全に行うには残り時間が足りません | その注文は期限切れにさせ、ステップ 1 からやり直してください |
179
+ | `ALREADY_SENT` | この注文に対する送金が既に記録されています | 再送信しては**いけません**。まず `status.js` を実行し、チェーンを確認してください |
180
+
181
+ **ウォレットから既に資金が出ている場合は、決して二重に支払わないでください。**
182
+ `linkId`、`rozoPaymentId`、すべてのトランザクションハッシュを保管し、人間に照合を
183
+ 依頼してください。使い捨ての入金アドレスへの 2 回目の支払いは、入金として反映される
184
+ 保証がありません。
185
+
186
+ エラーコードの完全な一覧は [README.md](README.md) に、エージェント向けの指示は
187
+ [SKILL.md](SKILL.md) にあります。
package/QUICKSTART.md ADDED
@@ -0,0 +1,188 @@
1
+ # Quick start
2
+
3
+ **English** | [简体中文](QUICKSTART.zh.md) | [日本語](QUICKSTART.ja.md) | [Español](QUICKSTART.es.md)
4
+
5
+ Pay an OpenRouter Coinbase Payment Link with USDT/USDC on Solana, BNB Chain,
6
+ Ethereum, Polygon, Base or Stellar, or with BTC over Lightning. Five minutes.
7
+ For how it works and why, see [README.md](README.md).
8
+
9
+ ## The one-liner
10
+
11
+ ```bash
12
+ npx @rozoai/checkout pay https://payments.coinbase.com/payment-links/pl_01YOURLINKID --with usdt-solana
13
+ ```
14
+
15
+ That runs every step below for you: quote, create, review, confirm, deposit
16
+ instructions, then polling until settlement. Coins for `--with`: `usdt-solana`,
17
+ `usdc-solana`, `usdt-bnb`, `usdc-bnb`, `usdt-ethereum`, `usdc-ethereum`,
18
+ `usdt-polygon`, `usdc-polygon`, `usdc-base`, `usdc-stellar`, `btc-lightning`.
19
+
20
+ Add `--send` to pay from a hot wallet rather than your own, and `--json` for
21
+ machine-readable output.
22
+
23
+ The rest of this page is the same flow run one step at a time, which is what
24
+ you want if something goes wrong or you are scripting it yourself.
25
+
26
+ ## Before you start
27
+
28
+ - **Node 18 or newer** (`node -v`). Nothing else to install — `npx` fetches the
29
+ CLI, and the cloned `scripts/dist/*.js` are self-contained bundles.
30
+ - **A wallet** holding the coin you want to pay with, on the chain you pick.
31
+ - **The Coinbase link**, e.g.
32
+ `https://payments.coinbase.com/payment-links/pl_01YOURLINKID`.
33
+ - No account and no API key. Every endpoint here is public.
34
+
35
+ Set it once:
36
+
37
+ ```bash
38
+ LINK="https://payments.coinbase.com/payment-links/pl_01YOURLINKID"
39
+ ```
40
+
41
+ Chain ids: `1` Ethereum · `56` BNB Chain · `137` Polygon · `8453` Base ·
42
+ `900` Solana · `1500` Stellar · `lightning` Bitcoin Lightning.
43
+
44
+ ## 1. Quote it (read-only, free)
45
+
46
+ ```bash
47
+ node scripts/dist/quote.js --url "$LINK"
48
+ ```
49
+
50
+ ```json
51
+ {
52
+ "success": true,
53
+ "merchant": "OpenRouter, Inc.",
54
+ "invoice": { "amount": "5.00", "fiat": { "amount": "5.00", "currency": "USD" } },
55
+ "callerPays": "5.00",
56
+ "coinbaseExpiryIso": "2026-08-09T10:00:00.000Z"
57
+ }
58
+ ```
59
+
60
+ `"success": false` with `LINK_NO_LONGER_PAYABLE` means the link is used or
61
+ expired — ask for a fresh one and stop.
62
+
63
+ ## 2. Create the order
64
+
65
+ ```bash
66
+ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT
67
+ ```
68
+
69
+ No money moves, and an unfunded order simply expires. The full deposit address
70
+ is **withheld** at this stage — you get a masked summary to check first.
71
+
72
+ ```json
73
+ {
74
+ "success": true,
75
+ "rozoPaymentId": "11111111-2222-4333-8444-555555555555",
76
+ "invoice": { "amount": "5.000000", "currency": "USD" },
77
+ "deposit": null,
78
+ "depositWithheld": true,
79
+ "display": {
80
+ "chain": "Solana",
81
+ "amount": "5.021000 USDT",
82
+ "payToMasked": "9WzDXw...AWWM",
83
+ "memoRequirement": "This deposit REQUIRES the memo/tag below. ..."
84
+ },
85
+ "expiry": { "effectiveDeadlineIso": "2026-08-08T11:00:00.000Z", "minutesOfSlack": 55 }
86
+ }
87
+ ```
88
+
89
+ **Check `display.amount` before going on.** It is normally larger than the
90
+ invoice — it includes the bridge and network fees. Note the `rozoPaymentId`;
91
+ every later command uses it.
92
+
93
+ ## 3. Confirm
94
+
95
+ Only once you have decided to pay, re-run the same command with `--confirm`:
96
+
97
+ ```bash
98
+ node scripts/dist/create-order.js --url "$LINK" --chain 900 --token USDT --confirm
99
+ ```
100
+
101
+ This releases the full deposit details and records the confirmation the send
102
+ scripts require.
103
+
104
+ ```json
105
+ {
106
+ "success": true,
107
+ "confirmed": true,
108
+ "deposit": {
109
+ "chain": "Solana",
110
+ "tokenSymbol": "USDT",
111
+ "receiverAddress": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM",
112
+ "receiverMemo": "rozo-901",
113
+ "amount": "5.021000",
114
+ "payTo": "9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM"
115
+ }
116
+ }
117
+ ```
118
+
119
+ For Lightning, `deposit.lnInvoice` holds the BOLT11 string to scan, and
120
+ `deposit.amount` is in satoshis.
121
+
122
+ ## 4. Pay
123
+
124
+ Pick one. **Mode A** — pay from your own wallet: send exactly
125
+ `deposit.amount` of `deposit.tokenSymbol` to `deposit.receiverAddress`, on
126
+ `deposit.chain`, including `deposit.receiverMemo` if there is one. Copy the
127
+ address from the JSON; never retype it.
128
+
129
+ **Mode B** — let the script pay from a hot wallet (EVM and Solana only):
130
+
131
+ ```bash
132
+ # Preview exactly what would be signed — signs nothing
133
+ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
134
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --dry-run
135
+
136
+ # Actually send. --send is mandatory.
137
+ ROZO_CHECKOUT_SOL_KEY=<base58 secret key> \
138
+ node scripts/dist/send-sol.js --rozo-payment-id <rozoPaymentId> --send
139
+ ```
140
+
141
+ Use `send-evm.js` with `ROZO_CHECKOUT_EVM_KEY` for Ethereum, BNB Chain,
142
+ Polygon and Base. Caps: $100 per transaction, $200 per session.
143
+
144
+ ```json
145
+ {
146
+ "success": true,
147
+ "submitted": true,
148
+ "confirmed": true,
149
+ "txHash": "3Bxs4h24hBjHziQ8UJqSjqjbjWQq2sQ3yV9Fq4HrVh5c"
150
+ }
151
+ ```
152
+
153
+ ## 5. Watch it settle
154
+
155
+ ```bash
156
+ node scripts/dist/status.js --rozo-payment-id <rozoPaymentId> --watch --timeout 600
157
+ ```
158
+
159
+ ```json
160
+ {
161
+ "success": true,
162
+ "state": "settled",
163
+ "terminal": true,
164
+ "payin": { "txHash": "3Bxs4h24...", "confirmedAt": "2026-08-08T10:05:00.000Z" }
165
+ }
166
+ ```
167
+
168
+ States run `awaiting_deposit` → `payin_detected` → `payin_confirmed` →
169
+ `bridging` → `paying_coinbase` → `settled`. Your on-chain transaction
170
+ confirming is not the end: keep polling until `settled`.
171
+
172
+ ## If something goes wrong
173
+
174
+ Read `error.code`. The three you are most likely to hit:
175
+
176
+ | `error.code` | What happened | What to do |
177
+ |---|---|---|
178
+ | `LINK_NO_LONGER_PAYABLE` | someone already paid the link, or it expired | ask the merchant for a fresh link; do not pay anything |
179
+ | `EXPIRY_MARGIN` | too little time left to fund, bridge and settle safely | let the order expire, then start again from step 1 |
180
+ | `ALREADY_SENT` | a send is already recorded for this order | do **not** send again; run `status.js` and check the chain first |
181
+
182
+ **If any money has already left your wallet, never pay again.** Keep the
183
+ `linkId`, the `rozoPaymentId` and every transaction hash, and get a human to
184
+ reconcile it. A second payment to a one-time deposit address is not guaranteed
185
+ to be credited.
186
+
187
+ The full error table is in [README.md](README.md), and the agent-facing
188
+ instructions are in [SKILL.md](SKILL.md).