openreceive 0.4.8 → 0.4.10
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +12 -0
- data/lib/openreceive/generated/tables.rb +5 -5
- data/lib/openreceive/version.rb +1 -1
- data/skills/debug-openreceive-payment/SKILL.md +8 -0
- data/skills/integrate-openreceive/SKILL.md +11 -0
- data/skills/integrate-openreceive/references/btcpay.md +4 -4
- data/skills/integrate-openreceive/references/django.md +16 -3
- data/skills/integrate-openreceive/references/fastapi.md +16 -3
- data/skills/integrate-openreceive/references/fastify.md +16 -3
- data/skills/integrate-openreceive/references/laravel.md +16 -3
- data/skills/integrate-openreceive/references/next.md +17 -5
- data/skills/integrate-openreceive/references/node.md +16 -3
- data/skills/integrate-openreceive/references/php.md +16 -3
- data/skills/integrate-openreceive/references/rails.md +17 -4
- data/skills/integrate-openreceive/references/woocommerce.md +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e612d1c8beae58671f0e863dbf26622b07a689010b81c3f05abd1463b7f1a4ff
|
|
4
|
+
data.tar.gz: 68c216cd101ad1d50dd6175b4e565793f7b147a26e1d07e1cda18ffe42659ed6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 24f0505bb26aa2b2b06f439854cf8839825c24d4b1634ecc184c86a6914269f25c621664efc7ba792e04fc644ab2107784b7b78737564669bf57e77e5a8e5452
|
|
7
|
+
data.tar.gz: a3edc8c5fdda1f703da32f6abe8e87c2ee65fe0d8957c6da7d539b64a8f5762b2a9b0ec952c4f6ef7ee9d4ee5671d8d3675f67693eeff89c5f227b9d0026e089
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.10 - 2026-09-16
|
|
4
|
+
|
|
5
|
+
Release in lockstep with the 0.4.10 stablecoin checkout fix. The shared
|
|
6
|
+
pay-in asset table (`OpenReceive::Generated::SWAP_ASSET_INFO`) gains a
|
|
7
|
+
`pegged_to` key on the USDT and USDC rows. No Ruby engine or settlement
|
|
8
|
+
changes.
|
|
9
|
+
|
|
10
|
+
## 0.4.9 - 2026-09-14
|
|
11
|
+
|
|
12
|
+
Release in lockstep with the 0.4.9 checkout method-switch fix and updated
|
|
13
|
+
integration directions. No Ruby engine or settlement changes.
|
|
14
|
+
|
|
3
15
|
## 0.4.8 - 2026-09-14
|
|
4
16
|
|
|
5
17
|
Version alignment with the 0.4.8 checkout loading fix; no Ruby engine or
|
|
@@ -93,17 +93,17 @@ module OpenReceive
|
|
|
93
93
|
"USDT_TRON" => {
|
|
94
94
|
"pay_in_asset" => "USDT_TRON", "label" => "USDT",
|
|
95
95
|
"network_label" => "Tron", "coin" => "USDT",
|
|
96
|
-
"network" => "TRX"
|
|
96
|
+
"network" => "TRX", "pegged_to" => "USD"
|
|
97
97
|
}.freeze,
|
|
98
98
|
"USDT_SOL" => {
|
|
99
99
|
"pay_in_asset" => "USDT_SOL", "label" => "USDT",
|
|
100
100
|
"network_label" => "Solana", "coin" => "USDT",
|
|
101
|
-
"network" => "SOL"
|
|
101
|
+
"network" => "SOL", "pegged_to" => "USD"
|
|
102
102
|
}.freeze,
|
|
103
103
|
"USDC_SOL" => {
|
|
104
104
|
"pay_in_asset" => "USDC_SOL", "label" => "USDC",
|
|
105
105
|
"network_label" => "Solana", "coin" => "USDC",
|
|
106
|
-
"network" => "SOL"
|
|
106
|
+
"network" => "SOL", "pegged_to" => "USD"
|
|
107
107
|
}.freeze,
|
|
108
108
|
"ETH_ETH" => {
|
|
109
109
|
"pay_in_asset" => "ETH_ETH", "label" => "ETH",
|
|
@@ -113,12 +113,12 @@ module OpenReceive
|
|
|
113
113
|
"USDT_ETH" => {
|
|
114
114
|
"pay_in_asset" => "USDT_ETH", "label" => "USDT",
|
|
115
115
|
"network_label" => "Ethereum", "coin" => "USDT",
|
|
116
|
-
"network" => "ETH"
|
|
116
|
+
"network" => "ETH", "pegged_to" => "USD"
|
|
117
117
|
}.freeze,
|
|
118
118
|
"USDC_ETH" => {
|
|
119
119
|
"pay_in_asset" => "USDC_ETH", "label" => "USDC",
|
|
120
120
|
"network_label" => "Ethereum", "coin" => "USDC",
|
|
121
|
-
"network" => "ETH"
|
|
121
|
+
"network" => "ETH", "pegged_to" => "USD"
|
|
122
122
|
}.freeze,
|
|
123
123
|
}.freeze
|
|
124
124
|
|
data/lib/openreceive/version.rb
CHANGED
|
@@ -70,6 +70,14 @@ same diagnostics redacted, always exit 0 — safe to share.
|
|
|
70
70
|
- Refunds exist only for swap deposits from `refund_required`. There is **no
|
|
71
71
|
Lightning refund** — the wallet cannot spend. Do not chase one.
|
|
72
72
|
https://openreceive.org/guides/swap-refunds.md
|
|
73
|
+
- "Payer reports two different amounts on a stablecoin checkout" (50.05 or
|
|
74
|
+
50.03?): the deposit amount is a token quantity, `fee.pay_in_fiat` is its
|
|
75
|
+
fiat valuation. Only `swap.deposit_amount` is an instruction. From 0.4.10 the
|
|
76
|
+
packaged checkout renders a USD stablecoin's breakdown in the token and never
|
|
77
|
+
shows `pay_in_fiat`; on an older bundle, upgrade `@openreceive/*`. To verify,
|
|
78
|
+
read the row's `deposit_amount` and `fee` and confirm the UI shows only the
|
|
79
|
+
deposit amount. A custom UI must call `createSwapFeeBreakdown(fee, swap)`
|
|
80
|
+
with the swap, not the fee alone.
|
|
73
81
|
|
|
74
82
|
## 6. Checkout UI shows nothing
|
|
75
83
|
|
|
@@ -86,6 +86,17 @@ state; do not retry-loop it, and do not build an idempotency store around it —
|
|
|
86
86
|
that serialization is the library's job. (A hook failure while persisting an
|
|
87
87
|
attempt is a **503 retryable**, deliberately distinct.)
|
|
88
88
|
|
|
89
|
+
## Amounts on the deposit panel
|
|
90
|
+
|
|
91
|
+
`swap.deposit_amount` is the ONLY amount a payer is ever told to send, in the
|
|
92
|
+
pay-in token. `swap.fee.pay_in_fiat` / `payout_fiat` are fiat valuations that
|
|
93
|
+
explain the spread (why the deposit exceeds the cart total); they are not
|
|
94
|
+
instructions. For a stablecoin pegged to the fee currency (USDT, USDC) the
|
|
95
|
+
packaged checkout expresses the breakdown in the token and never renders
|
|
96
|
+
`pay_in_fiat` — "$50.03" under "50.05 USDC" reads as the same number with a
|
|
97
|
+
typo. A custom UI gets the same rule from `createSwapFeeBreakdown(fee, swap)`;
|
|
98
|
+
pass the swap, not just the fee.
|
|
99
|
+
|
|
89
100
|
## Secrets
|
|
90
101
|
|
|
91
102
|
`NWC_URI` and `LSC_URI_*` are server-only. Never put them in browser code,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (BTCPay Server)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Connect a BTCPay Server store to a receive-only NWC wallet with the OpenReceive
|
|
6
6
|
plugin, and optionally let payers pay BTCPay invoices with USDT, USDC, ETH or
|
|
@@ -32,7 +32,7 @@ refund path on the same checkout screen.
|
|
|
32
32
|
|
|
33
33
|
## Step 0 — check the deployment before you change anything
|
|
34
34
|
|
|
35
|
-
1. Confirm the BTCPay Server version is 2.4.
|
|
35
|
+
1. Confirm the BTCPay Server version is 2.4.4 or later (Server Settings →
|
|
36
36
|
About, or `GET /api/v1/server/info`). The plugin declares that minimum and
|
|
37
37
|
BTCPay refuses to load it below.
|
|
38
38
|
2. Check whether the plugin is installed (Server Settings → Plugins, or the
|
|
@@ -128,7 +128,7 @@ passes. The page it comes from is https://openreceive.org/guides/quickstart-btcp
|
|
|
128
128
|
|
|
129
129
|
## BTCPay Server quickstart
|
|
130
130
|
|
|
131
|
-
Requires BTCPay Server ≥ 2.4.
|
|
131
|
+
Requires BTCPay Server ≥ 2.4.4.
|
|
132
132
|
|
|
133
133
|
The OpenReceive plugin makes a receive-only NWC wallet the Lightning node of a
|
|
134
134
|
BTCPay store. BTCPay mints every Lightning invoice in that wallet and records
|
|
@@ -143,7 +143,7 @@ invoices, checkout, webhooks and Greenfield API are the host.
|
|
|
143
143
|
|
|
144
144
|
### 1. Prerequisites
|
|
145
145
|
|
|
146
|
-
- A BTCPay Server, version 2.4.
|
|
146
|
+
- A BTCPay Server, version 2.4.4 or later, on any network (mainnet, testnet,
|
|
147
147
|
signet, regtest). The wallet must be on the same network.
|
|
148
148
|
- A receive-only NWC code for the wallet you want to receive into
|
|
149
149
|
([get one here](https://openreceive.org/get_a_nwc_code_to_receive_payments)).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Django)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Django project — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the Python package is on PyPI
|
|
@@ -218,6 +218,8 @@ The engine serves JSON only, so the view is yours — but the drop-ins
|
|
|
218
218
|
list is the short form of https://openreceive.org/guides/checkout-ux.md, for a UI
|
|
219
219
|
built on `@openreceive/browser/headless`. Read that before writing components.
|
|
220
220
|
|
|
221
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
222
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
221
223
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
222
224
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
223
225
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -229,6 +231,13 @@ built on `@openreceive/browser/headless`. Read that before writing components.
|
|
|
229
231
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
230
232
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
231
233
|
the model gives it.
|
|
234
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
235
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
236
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
237
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
238
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
239
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
240
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
232
241
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
233
242
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
234
243
|
`startSwap` reports through `onError`.
|
|
@@ -584,6 +593,11 @@ manage.py openreceive_doctor # the same, for humans; neve
|
|
|
584
593
|
|
|
585
594
|
### Render the checkout
|
|
586
595
|
|
|
596
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
597
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
598
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
599
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
600
|
+
|
|
587
601
|
The app serves JSON checkout routes only — rendering is your template. Any
|
|
588
602
|
OpenReceive frontend package works against the `/openreceive` mount; the
|
|
589
603
|
smallest is the custom element, and the Python package carries its
|
|
@@ -604,8 +618,7 @@ bundler at all:
|
|
|
604
618
|
|
|
605
619
|
`openreceive-checkout.js` registers the `<openreceive-checkout>` tag when it
|
|
606
620
|
loads (one self-contained ES module, un-minified identifiers), and the
|
|
607
|
-
stylesheet is scoped to what OpenReceive renders
|
|
608
|
-
CSS framework in any order. `collectstatic` ships both with the rest of your
|
|
621
|
+
stylesheet is scoped to what OpenReceive renders. `collectstatic` ships both with the rest of your
|
|
609
622
|
static files; the package's `MANIFEST.json` names every file and its hash. The
|
|
610
623
|
element creates the checkout for `reference`, then renders and polls itself
|
|
611
624
|
(its default `prefix` is already `/openreceive`).
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (FastAPI)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a FastAPI application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the engine is on PyPI
|
|
@@ -215,6 +215,8 @@ This list is the short form of https://openreceive.org/guides/checkout-ux.md, fo
|
|
|
215
215
|
UI built on `@openreceive/browser/headless`. Read that before writing
|
|
216
216
|
components.
|
|
217
217
|
|
|
218
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
219
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
218
220
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
219
221
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
220
222
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -226,6 +228,13 @@ components.
|
|
|
226
228
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
227
229
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
228
230
|
the model gives it.
|
|
231
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
232
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
233
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
234
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
235
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
236
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
237
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
229
238
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
230
239
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
231
240
|
`startSwap` reports through `onError`.
|
|
@@ -486,8 +495,12 @@ import "@openreceive/react/styles.css";
|
|
|
486
495
|
The checkout renders, polls, and settles itself. The compiled `styles.css`
|
|
487
496
|
sheets (`@openreceive/react`, `@openreceive/elements`) are self-contained — a
|
|
488
497
|
plain `<link rel="stylesheet">` works with no build step — and scoped: every
|
|
489
|
-
rule applies only inside what OpenReceive renders
|
|
490
|
-
|
|
498
|
+
rule applies only inside what OpenReceive renders.
|
|
499
|
+
|
|
500
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
501
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
502
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
503
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
491
504
|
|
|
492
505
|
`<Checkout>` is complete as rendered: it already shows the `description` from
|
|
493
506
|
`amountFor` and the collapsed transaction-details panel. Do not build a custom
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Fastify)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Fastify application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the packages are on npm, and
|
|
@@ -198,6 +198,8 @@ This list is the short form of https://openreceive.org/guides/checkout-ux.md, fo
|
|
|
198
198
|
UI built on `@openreceive/browser/headless`. Read that before writing
|
|
199
199
|
components.
|
|
200
200
|
|
|
201
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
202
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
201
203
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
202
204
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
203
205
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -209,6 +211,13 @@ components.
|
|
|
209
211
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
210
212
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
211
213
|
the model gives it.
|
|
214
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
215
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
216
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
217
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
218
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
219
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
220
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
212
221
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
213
222
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
214
223
|
`startSwap` reports through `onError`.
|
|
@@ -488,8 +497,12 @@ import "@openreceive/react/styles.css";
|
|
|
488
497
|
The checkout renders, polls, and settles itself. The compiled `styles.css`
|
|
489
498
|
sheets (`@openreceive/react`, `@openreceive/elements`) are self-contained — a
|
|
490
499
|
plain `<link rel="stylesheet">` works with no build step — and scoped: every
|
|
491
|
-
rule applies only inside what OpenReceive renders
|
|
492
|
-
|
|
500
|
+
rule applies only inside what OpenReceive renders.
|
|
501
|
+
|
|
502
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
503
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
504
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
505
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
493
506
|
|
|
494
507
|
`<Checkout>` is complete as rendered: it already shows the `description` from
|
|
495
508
|
`amountFor` and the collapsed transaction-details panel. Do not build a custom
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Laravel)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Laravel application — the app you are already working in.
|
|
6
6
|
You do not need a copy of the OpenReceive source: the package is on Packagist
|
|
@@ -203,6 +203,8 @@ The engine serves JSON only, so the view is yours — but the drop-ins
|
|
|
203
203
|
list is the short form of https://openreceive.org/guides/checkout-ux.md, for a UI
|
|
204
204
|
built on `@openreceive/browser/headless`. Read that before writing components.
|
|
205
205
|
|
|
206
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
207
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
206
208
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
207
209
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
208
210
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -214,6 +216,13 @@ built on `@openreceive/browser/headless`. Read that before writing components.
|
|
|
214
216
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
215
217
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
216
218
|
the model gives it.
|
|
219
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
220
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
221
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
222
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
223
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
224
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
225
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
217
226
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
218
227
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
219
228
|
`startSwap` reports through `onError`.
|
|
@@ -560,12 +569,16 @@ costs one relay round trip, not two.
|
|
|
560
569
|
|
|
561
570
|
### Render the checkout
|
|
562
571
|
|
|
572
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
573
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
574
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
575
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
576
|
+
|
|
563
577
|
The engine serves JSON checkout routes only — rendering is your view. Any
|
|
564
578
|
OpenReceive frontend package works against the `/openreceive` mount; the
|
|
565
579
|
smallest is the custom element (its default `prefix` is already
|
|
566
580
|
`/openreceive`, and the package ships a self-contained `styles.css`; it is
|
|
567
|
-
scoped to what OpenReceive renders, so
|
|
568
|
-
framework in any order). Laravel ships Vite, so the package installs like any
|
|
581
|
+
scoped to what OpenReceive renders). Laravel ships Vite, so the package installs like any
|
|
569
582
|
other frontend dependency:
|
|
570
583
|
|
|
571
584
|
```sh
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Next.js)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Next.js App Router application — the app you are already
|
|
6
6
|
working in. You do not need a copy of the OpenReceive source: the packages are
|
|
@@ -204,6 +204,8 @@ This list is the short form of https://openreceive.org/guides/checkout-ux.md, fo
|
|
|
204
204
|
UI built on `@openreceive/browser/headless`. Read that before writing
|
|
205
205
|
components.
|
|
206
206
|
|
|
207
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
208
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
207
209
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
208
210
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
209
211
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -215,6 +217,13 @@ components.
|
|
|
215
217
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
216
218
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
217
219
|
the model gives it.
|
|
220
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
221
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
222
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
223
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
224
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
225
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
226
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
218
227
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
219
228
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
220
229
|
`startSwap` reports through `onError`.
|
|
@@ -537,10 +546,13 @@ reference the current session may not see; the page can read the session and
|
|
|
537
546
|
|
|
538
547
|
The checkout renders, polls, and settles itself. The compiled `styles.css`
|
|
539
548
|
sheets (`@openreceive/react`, `@openreceive/elements`) are self-contained and
|
|
540
|
-
scoped: every rule applies only inside what OpenReceive renders
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
549
|
+
scoped: every rule applies only inside what OpenReceive renders. No
|
|
550
|
+
`transpilePackages` entry is needed; the packages ship plain ESM.
|
|
551
|
+
|
|
552
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
553
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
554
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
555
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
544
556
|
|
|
545
557
|
`<Checkout>` is complete as rendered: it already shows the `description` from
|
|
546
558
|
`amountFor` and the collapsed transaction-details panel. Do not build a custom
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Node.js)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Node application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the packages are on npm, and the
|
|
@@ -190,6 +190,8 @@ This list is the short form of https://openreceive.org/guides/checkout-ux.md, fo
|
|
|
190
190
|
UI built on `@openreceive/browser/headless`. Read that before writing
|
|
191
191
|
components.
|
|
192
192
|
|
|
193
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
194
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
193
195
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
194
196
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
195
197
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -201,6 +203,13 @@ components.
|
|
|
201
203
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
202
204
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
203
205
|
the model gives it.
|
|
206
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
207
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
208
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
209
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
210
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
211
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
212
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
204
213
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
205
214
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
206
215
|
`startSwap` reports through `onError`.
|
|
@@ -465,8 +474,12 @@ import "@openreceive/react/styles.css";
|
|
|
465
474
|
The checkout renders, polls, and settles itself. The compiled `styles.css`
|
|
466
475
|
sheets (`@openreceive/react`, `@openreceive/elements`) are self-contained — a
|
|
467
476
|
plain `<link rel="stylesheet">` works with no build step — and scoped: every
|
|
468
|
-
rule applies only inside what OpenReceive renders
|
|
469
|
-
|
|
477
|
+
rule applies only inside what OpenReceive renders.
|
|
478
|
+
|
|
479
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
480
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
481
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
482
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
470
483
|
|
|
471
484
|
`<Checkout>` is complete as rendered: it already shows the `description` from
|
|
472
485
|
`amountFor` and the collapsed transaction-details panel. Do not build a custom
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (PHP)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a PHP application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the engine is on Packagist
|
|
@@ -216,6 +216,8 @@ The drop-in (`<openreceive-checkout>`, from the release's standalone tarball or
|
|
|
216
216
|
of https://openreceive.org/guides/checkout-ux.md, for a UI built on
|
|
217
217
|
`@openreceive/browser/headless`. Read that before writing components.
|
|
218
218
|
|
|
219
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
220
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
219
221
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
220
222
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
221
223
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -227,6 +229,13 @@ of https://openreceive.org/guides/checkout-ux.md, for a UI built on
|
|
|
227
229
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
228
230
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
229
231
|
the model gives it.
|
|
232
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
233
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
234
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
235
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
236
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
237
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
238
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
230
239
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
231
240
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
232
241
|
`startSwap` reports through `onError`.
|
|
@@ -513,6 +522,11 @@ and the browser snapshots are snake_case throughout.
|
|
|
513
522
|
|
|
514
523
|
### 5. Render checkout
|
|
515
524
|
|
|
525
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
526
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
527
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
528
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
529
|
+
|
|
516
530
|
Unpack the release's `standalone-checkout-<version>.tar.gz` into a directory
|
|
517
531
|
your web server serves — `public/openreceive/` here — and add two tags plus
|
|
518
532
|
the element:
|
|
@@ -529,8 +543,7 @@ the element:
|
|
|
529
543
|
|
|
530
544
|
The module registers `<openreceive-checkout>` as it loads; the element creates
|
|
531
545
|
the checkout for `reference`, then renders, polls and settles itself. The
|
|
532
|
-
stylesheet is scoped to what OpenReceive renders
|
|
533
|
-
any CSS framework. The checkout follows the payer's theme; on a page that is
|
|
546
|
+
stylesheet is scoped to what OpenReceive renders. The checkout follows the payer's theme; on a page that is
|
|
534
547
|
always one theme, lock it with `theme="dark"`. React/Vue/Svelte/Angular apps
|
|
535
548
|
use the matching wrapper package instead — same attributes
|
|
536
549
|
([Frontend checkout](https://openreceive.org/guides/frontend-checkout.md)); a custom UI builds on
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (Rails)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Add OpenReceive to a Rails application — the app you are already working in. You
|
|
6
6
|
do not need a copy of the OpenReceive source: the gem is on RubyGems, the
|
|
@@ -197,6 +197,8 @@ The engine serves JSON only, so the view is yours — but the drop-ins
|
|
|
197
197
|
list is the short form of https://openreceive.org/guides/checkout-ux.md, for a UI
|
|
198
198
|
built on `@openreceive/browser/headless`. Read that before writing components.
|
|
199
199
|
|
|
200
|
+
- Check Bitcoin → Switch payment method → Bitcoin: the grid must hide the
|
|
201
|
+
Lightning invoice, then restore the same bolt11 without another mint.
|
|
200
202
|
- `createCheckoutController` is the engine. Do not hand-roll a poll loop.
|
|
201
203
|
- `createCheckoutStatusModel` for the status line. Do not draw a
|
|
202
204
|
Cart → Pay → Done stepper. Read the model's `phase`, not the snapshot's.
|
|
@@ -208,6 +210,13 @@ built on `@openreceive/browser/headless`. Read that before writing components.
|
|
|
208
210
|
- `createSwapDisplayModel` → `display.copyRows` for deposits: address, memo,
|
|
209
211
|
and the bare amount each get a copy row. Render `swap.networkWarning*` as
|
|
210
212
|
the model gives it.
|
|
213
|
+
- `swap.deposit_amount` is the only amount a payer is told to send. Never put
|
|
214
|
+
a fiat valuation of it (`swap.fee.pay_in_fiat`) next to a stablecoin amount:
|
|
215
|
+
"$50.03" under "50.05 USDC" reads as a typo, and the payer asks which one to
|
|
216
|
+
send. The one fiat figure on a USDT/USDC deposit panel is the cart total
|
|
217
|
+
(`payout_fiat`); express "you send" and the fee in the token. Use
|
|
218
|
+
`createSwapFeeBreakdown(fee, swap)` — with the swap, not the fee alone — and
|
|
219
|
+
it applies this for you; SOL and ETH keep a fiat breakdown.
|
|
211
220
|
- `createCheckoutSession` owns mint and swap start. To start swaps, pass its
|
|
212
221
|
`swap` option (`selection`, `prefix`, `fetch`) together. Without it
|
|
213
222
|
`startSwap` reports through `onError`.
|
|
@@ -535,12 +544,16 @@ consoles) the client is built lazily so no live wallet is needed.
|
|
|
535
544
|
|
|
536
545
|
### Render the checkout
|
|
537
546
|
|
|
547
|
+
Serve the compiled `styles.css` without Tailwind processing: import it from
|
|
548
|
+
JavaScript (with a CSS-capable bundler) or use a plain `<link rel="stylesheet">`.
|
|
549
|
+
Do not `@import` it into the host Tailwind entry. Its zero-specificity rules
|
|
550
|
+
allow host styles to override checkout styles; scoping does not prevent that.
|
|
551
|
+
|
|
538
552
|
The engine serves JSON checkout routes only — rendering is your view. Any
|
|
539
553
|
OpenReceive frontend package works against the `/openreceive` mount; the
|
|
540
554
|
smallest is the custom element (its default `prefix` is already
|
|
541
555
|
`/openreceive`, and the package ships a self-contained `styles.css` a plain
|
|
542
|
-
stylesheet link can serve; it is scoped to what OpenReceive renders
|
|
543
|
-
sits safely next to any CSS framework in any order):
|
|
556
|
+
stylesheet link can serve; it is scoped to what OpenReceive renders):
|
|
544
557
|
|
|
545
558
|
```erb
|
|
546
559
|
<%# app/views/orders/pay.html.erb %>
|
|
@@ -548,7 +561,7 @@ sits safely next to any CSS framework in any order):
|
|
|
548
561
|
```
|
|
549
562
|
|
|
550
563
|
```js
|
|
551
|
-
// In your JS bundle (
|
|
564
|
+
// In your JS bundle (esbuild/webpacker with CSS support):
|
|
552
565
|
import { defineElements } from "@openreceive/elements";
|
|
553
566
|
import "@openreceive/elements/styles.css"; // or link the compiled styles.css
|
|
554
567
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# OpenReceive agent directions (WordPress + WooCommerce)
|
|
2
2
|
|
|
3
|
-
These directions describe OpenReceive 0.4.
|
|
3
|
+
These directions describe OpenReceive 0.4.10.
|
|
4
4
|
|
|
5
5
|
Install and configure the OpenReceive gateway in the existing WooCommerce
|
|
6
6
|
store. Preserve its theme, checkout, customer accounts, order model and prices.
|