@siglume/direct-request-payment 0.4.12 → 0.4.13
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/CHANGELOG.md +22 -11
- package/README.md +38 -19
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/docs/api-reference.md +16 -10
- package/docs/metered-statements.md +30 -26
- package/docs/pricing.md +54 -38
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.4.13 - 2026-06-19
|
|
4
|
+
|
|
5
|
+
Seller-borne Micro / Nano protocol fee correction.
|
|
6
|
+
|
|
7
|
+
- Added `provider_usage_amount_minor` to provider usage events so provider usage
|
|
8
|
+
amount and provider receivable can be reconciled separately.
|
|
9
|
+
- Clarified that all SDRP payment fees are seller-borne: Micro / Nano protocol
|
|
10
|
+
fees are deducted from provider receivable and are not added to buyer debit.
|
|
11
|
+
- Updated metered statement formulas, CSV documentation, and API reference amount
|
|
12
|
+
names to match the seller-borne settlement model.
|
|
13
|
+
|
|
3
14
|
## 0.4.12 - 2026-06-19
|
|
4
15
|
|
|
5
16
|
Documentation-only fee-unit correction.
|
|
@@ -28,9 +39,9 @@ Public beta scope and metered usage hardening patch.
|
|
|
28
39
|
- Clarified that the current public beta supports JPYC / USDC settlement on
|
|
29
40
|
Polygon PoS only and does not support multi-chain, cross-chain, or
|
|
30
41
|
multi-wallet settlement routing through the public SDK.
|
|
31
|
-
- Clarified
|
|
32
|
-
|
|
33
|
-
|
|
42
|
+
- Clarified Standard Payment fee deduction and Micro / Nano fee reporting. The
|
|
43
|
+
Micro / Nano fee-burden wording from that release was superseded by the
|
|
44
|
+
seller-borne correction in 0.4.13.
|
|
34
45
|
|
|
35
46
|
## 0.4.9 - 2026-06-19
|
|
36
47
|
|
|
@@ -136,7 +147,7 @@ public capability is now documented and every signature verified against code.
|
|
|
136
147
|
`buildPreparedTransactionExecutionPayload`, and `computeWebhookSignature` (plus
|
|
137
148
|
full per-function webhook-verification entries with examples).
|
|
138
149
|
- Added an **Exported Constants** table (all 8 importable constants with values)
|
|
139
|
-
and an **Aliases** table (the `external_402*` legacy aliases
|
|
150
|
+
and an **Aliases** table (the `external_402*` legacy aliases ↁEpreferred
|
|
140
151
|
`DirectRequestPayment*` names).
|
|
141
152
|
- Replaced the "Python uses snake_case" hand-wave with the **actual Python
|
|
142
153
|
keyword-only signatures** for the challenge / webhook / signature verifiers.
|
|
@@ -175,7 +186,7 @@ and humans pay through a Siglume-hosted checkout page.
|
|
|
175
186
|
challenge server-side and returns a `checkout_url`; redirect the shopper there.
|
|
176
187
|
The shopper logs into Siglume, approves, and pays from their own Siglume wallet
|
|
177
188
|
(JPYC / USDC), then returns to your `success_url`. Fulfill on the existing
|
|
178
|
-
`direct_payment.confirmed` webhook
|
|
189
|
+
`direct_payment.confirmed` webhook Ethe source of truth Eexactly as with the
|
|
179
190
|
agent flow. The merchant SDK still does not authenticate the buyer.
|
|
180
191
|
- **`getCheckoutSession(session_id)`** (TS + Py): read a session's status
|
|
181
192
|
(`open` / `authenticated` / `paid` / `expired` / `cancelled` / `failed`).
|
|
@@ -186,7 +197,7 @@ and humans pay through a Siglume-hosted checkout page.
|
|
|
186
197
|
- Docs: documented the **two buyer systems** (human Web = Hosted Checkout; AI
|
|
187
198
|
agent / AtoA = direct API / tools), the AtoA **prerequisite** that the buyer
|
|
188
199
|
agent is pre-connected to Siglume (MCP/OAuth, or a custom app holding the
|
|
189
|
-
buyer's Siglume JWT), and the merchant / Siglume / buyer **boundaries**
|
|
200
|
+
buyer's Siglume JWT), and the merchant / Siglume / buyer **boundaries** E
|
|
190
201
|
including that the buyer needs a Siglume wallet and this is **not** a card
|
|
191
202
|
payment.
|
|
192
203
|
|
|
@@ -203,7 +214,7 @@ challenges and clients from 0.3.x interoperate unchanged.
|
|
|
203
214
|
pricing guide: Micro settles weekly, Nano settles monthly, with the closing
|
|
204
215
|
period, timezone, revenue-recognition point, retry / carry-over, and
|
|
205
216
|
rejected / no-charge behavior spelled out. The exact close time, default
|
|
206
|
-
timezone, and settlement lag are marked platform-managed
|
|
217
|
+
timezone, and settlement lag are marked platform-managed Ethe platform
|
|
207
218
|
response is the source of truth.
|
|
208
219
|
- Clarified that Micro / Nano provider revenue stays unsettled until the weekly /
|
|
209
220
|
monthly on-chain settlement succeeds, that failed settlements are retried and
|
|
@@ -226,8 +237,8 @@ challenges and clients from 0.3.x interoperate unchanged.
|
|
|
226
237
|
|
|
227
238
|
## 0.3.4 - 2026-06-18
|
|
228
239
|
|
|
229
|
-
- Docs: clarified the SDRP pricing structure
|
|
230
|
-
Micro / Nano are applied automatically by amount
|
|
240
|
+
- Docs: clarified the SDRP pricing structure Ea Standard plan is selected, and
|
|
241
|
+
Micro / Nano are applied automatically by amount Eacross the README and
|
|
231
242
|
pricing guide.
|
|
232
243
|
|
|
233
244
|
## 0.3.3 - 2026-06-18
|
|
@@ -245,7 +256,7 @@ challenges and clients from 0.3.x interoperate unchanged.
|
|
|
245
256
|
tag, not a once-per-day run limit. Siglume no longer caps scheduled autopay
|
|
246
257
|
at one charge per day; occurrences are bounded by the buyer's per-run,
|
|
247
258
|
daily, and monthly auto-pay budget plus the authorization's `max_runs` /
|
|
248
|
-
expiry. No code or wire-format changes
|
|
259
|
+
expiry. No code or wire-format changes Echallenges signed by 0.3.0 verify
|
|
249
260
|
unchanged.
|
|
250
261
|
- Release automation now uses npm and PyPI Trusted Publishing from GitHub
|
|
251
262
|
Actions, so normal releases do not require local npm OTP or PyPI credentials.
|
|
@@ -269,7 +280,7 @@ Recurring payment approval release.
|
|
|
269
280
|
- Documented the recurring payment flow (subscription and scheduled autopay)
|
|
270
281
|
in the README.
|
|
271
282
|
- Updated pricing docs: the Launch plan's free monthly allowance of 100
|
|
272
|
-
payments is retired
|
|
283
|
+
payments is retired ELaunch is now a flat 1.8% payment fee; the per-payment
|
|
273
284
|
minimum fee is JPY 30 (USD merchants: USD 0.20); JPY/JPYC and USD/USDC
|
|
274
285
|
settlement are both documented as first-class.
|
|
275
286
|
|
package/README.md
CHANGED
|
@@ -10,6 +10,17 @@ that want to accept Siglume wallet payments. The merchant fixes the order,
|
|
|
10
10
|
amount, and currency on its server; the buyer pays with a Siglume wallet;
|
|
11
11
|
Siglume applies the correct pricing and settlement path from the payment amount.
|
|
12
12
|
|
|
13
|
+
**Relationship to HTTP 402.** SDRP is built around the HTTP **402 Payment
|
|
14
|
+
Required** status: the Siglume platform returns **402 Payment Required** when a
|
|
15
|
+
payment is required but not yet completed (for example, attempting to consume a
|
|
16
|
+
payment requirement before it is confirmed). SDRP is **not wire-compatible with
|
|
17
|
+
Coinbase's x402** — the challenge and payment-payload design is different. SDRP
|
|
18
|
+
binds a signed `scheme:nonce:signature` challenge to the merchant, amount, and
|
|
19
|
+
currency, settles through a Siglume wallet (JPYC / USDC), and confirms via a
|
|
20
|
+
signed webhook; it does **not** use x402's HTTP-header payment payload or its
|
|
21
|
+
single-request pay-and-retry handshake. The internal mode name `external_402`
|
|
22
|
+
reflects this 402 lineage.
|
|
23
|
+
|
|
13
24
|
Use this package when an external EC site, booking service, membership service,
|
|
14
25
|
or paid API wants to accept Siglume wallet payments without taking custody of
|
|
15
26
|
customer funds. The SDK creates and verifies one-time and recurring wallet
|
|
@@ -188,20 +199,23 @@ setup, and after that the applied fee and the settlement timing follow the
|
|
|
188
199
|
- **Standard Payment** — most payments. Your selected plan's percentage fee,
|
|
189
200
|
settled on-chain immediately after each payment confirms.
|
|
190
201
|
- **Micro Payment** — small payments, applied automatically by amount. A flat
|
|
191
|
-
per-SDRP-Tx protocol fee,
|
|
202
|
+
per-SDRP-Tx protocol fee, settled weekly or earlier when the buyer/payee
|
|
203
|
+
batch reaches JPY 10,000 / USD 100.00.
|
|
192
204
|
- **Nano Payment** — very small payments, applied automatically by amount. A
|
|
193
|
-
flat per-SDRP-Tx protocol fee,
|
|
205
|
+
flat per-SDRP-Tx protocol fee, settled monthly or earlier when the buyer/payee
|
|
206
|
+
batch reaches JPY 10,000 / USD 100.00.
|
|
194
207
|
|
|
195
208
|
Here, `Tx` means one accepted SDRP payment, not the later on-chain settlement
|
|
196
209
|
transaction. Micro / Nano settlement batches are aggregated on-chain after the
|
|
197
|
-
weekly or monthly close.
|
|
210
|
+
weekly or monthly close, or earlier when the fixed amount threshold is reached.
|
|
198
211
|
|
|
199
212
|
Micro Payment and Nano Payment are not separate products you opt into; they are
|
|
200
213
|
amount bands Siglume applies on your behalf. Your integration code is the same
|
|
201
214
|
regardless of which band a payment falls into. The full fee table and the exact
|
|
202
|
-
weekly / monthly settlement schedule are in
|
|
215
|
+
weekly / monthly settlement schedule plus early threshold settlement rule are in
|
|
216
|
+
[docs/pricing.md](./docs/pricing.md).
|
|
203
217
|
Provider revenue in the Micro and Nano bands is not settled revenue until the
|
|
204
|
-
|
|
218
|
+
aggregated on-chain settlement succeeds. Siglume keeps outstanding failed
|
|
205
219
|
settlements for retry under the published policy, but does not advance or
|
|
206
220
|
guarantee provider revenue before settlement succeeds. Merchant setup and the
|
|
207
221
|
billing mandate terms assume the merchant accepts this Micro / Nano delayed
|
|
@@ -215,10 +229,11 @@ Sub-minor-unit Nano fees are accumulated with decimal precision and rounded only
|
|
|
215
229
|
when a settlement batch is created; see [Pricing](./docs/pricing.md) for the
|
|
216
230
|
rounding formula and `rounding_delta_minor` semantics.
|
|
217
231
|
For low-count Nano batches, integer-token settlement can make the effective
|
|
218
|
-
|
|
219
|
-
difference is reported as batch `rounding_delta_minor`.
|
|
220
|
-
|
|
221
|
-
|
|
232
|
+
rounded debit per SDRP Tx higher than the decimal provider usage amount; the
|
|
233
|
+
difference is reported as batch `rounding_delta_minor`. Micro / Nano protocol
|
|
234
|
+
fees are provider-borne and are not added to the buyer debit. Treat Micro /
|
|
235
|
+
Nano minor amounts as decimal strings and use a decimal library or `Decimal`
|
|
236
|
+
for accounting.
|
|
222
237
|
For operational reconciliation, expected revenue, settled revenue, retry state,
|
|
223
238
|
and CSV exports, see
|
|
224
239
|
[docs/metered-statements.md](./docs/metered-statements.md).
|
|
@@ -268,8 +283,8 @@ amounts differ.
|
|
|
268
283
|
| Public one-time payment amount | Applied automatically | What you select | Fee | Settlement |
|
|
269
284
|
| --- | --- | --- | --- | --- |
|
|
270
285
|
| JPY 501+ / USD 3.01+ | Standard Payment | Select one Standard plan: Launch, Starter, Growth, or Pro | Launch: JPY 0 / USD 0 monthly, 1.8%; Starter: JPY 980 / USD 6 monthly, 1.0%; Growth: JPY 2,980 / USD 18 monthly, 0.7%; Pro: JPY 9,800 / USD 60 monthly, 0.5%. Minimum JPY 30 / USD 0.20 per payment. | Settled on-chain immediately after the payment confirms |
|
|
271
|
-
| JPY 50-500 / USD 0.31-3.00 | Micro Payment | Applied automatically by amount | USD 0.01 / SDRP Tx, about JPY 2 | Weekly settlement - see [Settlement schedule](./docs/pricing.md#settlement-schedule) |
|
|
272
|
-
| JPY 1-49 / USD 0.01-0.30 | Nano Payment | Applied automatically by amount | USD 0.001 / SDRP Tx, about JPY 0.2 | Monthly settlement - see [Settlement schedule](./docs/pricing.md#settlement-schedule) |
|
|
286
|
+
| JPY 50-500 / USD 0.31-3.00 | Micro Payment | Applied automatically by amount | USD 0.01 / SDRP Tx, about JPY 2 | Weekly settlement, or earlier at JPY 10,000 / USD 100.00 - see [Settlement schedule](./docs/pricing.md#settlement-schedule) |
|
|
287
|
+
| JPY 1-49 / USD 0.01-0.30 | Nano Payment | Applied automatically by amount | USD 0.001 / SDRP Tx, about JPY 0.2 | Monthly settlement, or earlier at JPY 10,000 / USD 100.00 - see [Settlement schedule](./docs/pricing.md#settlement-schedule) |
|
|
273
288
|
|
|
274
289
|
In this table, `Tx` means one accepted SDRP payment, not an on-chain settlement
|
|
275
290
|
transaction.
|
|
@@ -288,9 +303,12 @@ returned on a payment requirement is the authoritative fee rate for that payment
|
|
|
288
303
|
in the merchant's settlement currency. For Micro / Nano, the statement APIs
|
|
289
304
|
expose `protocol_fee_minor`, `gross_buyer_debit_minor`, `buyer_debit_minor`, and
|
|
290
305
|
`rounding_delta_minor`.
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
306
|
+
All SDRP payment fees are seller-borne. Standard Payment fees are deducted from
|
|
307
|
+
the merchant settlement amount. Micro / Nano protocol fees are deducted from
|
|
308
|
+
provider receivable at aggregated settlement and are not added to the buyer
|
|
309
|
+
debit.
|
|
310
|
+
The full fee table, the weekly / monthly settlement schedule, and the JPY
|
|
311
|
+
10,000 / USD 100.00 early settlement threshold live in
|
|
294
312
|
[docs/pricing.md](./docs/pricing.md). Statement APIs for "how much was used,
|
|
295
313
|
when will it close, when can it debit, and what is settled" are documented in
|
|
296
314
|
[docs/metered-statements.md](./docs/metered-statements.md).
|
|
@@ -637,11 +655,12 @@ Read [docs/security.md](./docs/security.md) before going live.
|
|
|
637
655
|
|
|
638
656
|
- The Direct Request Payment HTTP endpoints live under
|
|
639
657
|
`/v1/sdrp/direct-payments/...`; the SDK targets them for you.
|
|
640
|
-
-
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
658
|
+
- The platform tags these payments with the internal mode value `external_402`,
|
|
659
|
+
which reflects SDRP's HTTP 402 Payment Required lineage (it is **not**
|
|
660
|
+
x402-wire-compatible — see "Relationship to HTTP 402"). The merchant registry
|
|
661
|
+
may also still expose the legacy billing-plan key `free` for the Launch tier.
|
|
662
|
+
The SDK sets and reads these values for you; `external_402` is an internal
|
|
663
|
+
mode identifier, not a public product name.
|
|
645
664
|
|
|
646
665
|
## Documentation
|
|
647
666
|
|
package/dist/index.cjs
CHANGED
|
@@ -83,7 +83,7 @@ var DIRECT_REQUEST_PAYMENT_RECEIPT_KIND = "sdrp_direct_payment";
|
|
|
83
83
|
var DIRECT_REQUEST_PAYMENT_ALLOWANCE_RECEIPT_KIND = "sdrp_direct_payment_allowance";
|
|
84
84
|
var DIRECT_REQUEST_PAYMENT_REFERENCE_TYPE = "sdrp_direct_payment_requirement";
|
|
85
85
|
var DEFAULT_WEBHOOK_TOLERANCE_SECONDS = 300;
|
|
86
|
-
var DIRECT_REQUEST_PAYMENT_SDK_VERSION = "0.4.
|
|
86
|
+
var DIRECT_REQUEST_PAYMENT_SDK_VERSION = "0.4.13";
|
|
87
87
|
var DIRECT_REQUEST_PAYMENT_STANDARD_SETTLED_STATUS = "settled";
|
|
88
88
|
var DIRECT_REQUEST_PAYMENT_METERED_ACCEPTED_STATUS = "pending_settlement";
|
|
89
89
|
var DIRECT_REQUEST_PAYMENT_STANDARD_FINALITY = "per_payment_onchain";
|