@siglume/direct-request-payment 0.4.12 → 0.4.14

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.
@@ -19,12 +19,13 @@ Siglume applies the settlement band from the amount.
19
19
 
20
20
  | Band | Cadence | Period close | First debit attempt | Revenue recognition |
21
21
  | --- | --- | --- | --- | --- |
22
- | Micro Payment | Weekly | Account-assigned fixed weekly slot in the buyer settlement timezone | After final debit notice delivery and the fixed close-plus-3-day window | Only after the aggregated settlement confirms on-chain |
23
- | Nano Payment | Monthly | Account-assigned fixed monthly slot in the buyer settlement timezone | After final debit notice delivery and the fixed close-plus-3-day window | Only after the aggregated settlement confirms on-chain |
22
+ | Micro Payment | Weekly, with early threshold settlement | Account-assigned fixed weekly slot in the buyer settlement timezone; can close early once the buyer/payee/token batch reaches JPY 10,000 or USD 100.00 | After final debit notice delivery and the fixed close-plus-3-day window | Only after the aggregated settlement confirms on-chain |
23
+ | Nano Payment | Monthly, with early threshold settlement | Account-assigned fixed monthly slot in the buyer settlement timezone; can close early once the buyer/payee/token batch reaches JPY 10,000 or USD 100.00 | After final debit notice delivery and the fixed close-plus-3-day window | Only after the aggregated settlement confirms on-chain |
24
24
 
25
- The schedule is platform-managed. Buyers and providers can see the assigned
26
- period and scheduled attempt times through the statement APIs, but cannot choose
27
- a custom close day.
25
+ The schedule is platform-managed. Buyers and providers can see the resulting
26
+ batch period and scheduled attempt times through the statement APIs, but cannot
27
+ choose a custom close day. Early threshold settlement can create a batch before
28
+ the account-assigned weekly or monthly close.
28
29
 
29
30
  The important timestamp is `not_before_attempt_at`. Siglume does not execute the
30
31
  debit before this timestamp. It is always after the final debit notice is
@@ -93,31 +94,33 @@ guarantee.
93
94
  ## Amount Rounding
94
95
 
95
96
  Micro / Nano usage rows keep provider price and protocol fee values as decimal
96
- minor-unit amounts. This allows Nano fees such as about JPY 0.2 per SDRP Tx to
97
- be accounted without rounding every accepted payment.
97
+ minor-unit amounts. This allows Nano fees such as JPY 0.2 per SDRP Tx to be
98
+ accounted without rounding every accepted payment.
98
99
 
99
100
  Rounding happens once when a settlement batch is created:
100
101
 
101
102
  ```text
102
103
  provider_usage_amount_minor = sum(provider price minor units for accepted metered rows)
103
104
  protocol_fee_minor = sum(Micro/Nano fixed protocol fee minor units for accepted metered rows)
104
- gross_buyer_debit_minor = provider_usage_amount_minor + protocol_fee_minor
105
+ provider_receivable_minor = max(provider_usage_amount_minor - protocol_fee_minor, 0)
106
+ gross_buyer_debit_minor = provider_usage_amount_minor
105
107
  buyer_debit_minor = ceil(gross_buyer_debit_minor)
106
108
  rounding_delta_minor = buyer_debit_minor - gross_buyer_debit_minor
107
109
  ```
108
110
 
109
- For low-count Nano batches, the ceiling can make the effective buyer burden per
110
- SDRP Tx higher than the headline "USD 0.001 / SDRP Tx" protocol fee. Here,
111
- `Tx` means one accepted SDRP payment, not an on-chain settlement transaction.
112
- The protocol fee remains the decimal statement amount; the extra integer-minor-unit
113
- adjustment is recorded as `rounding_delta_minor` on the settlement batch. Each
114
- settlement batch can add a positive rounding adjustment of less than 1 token
115
- minor unit; if a buyer uses many providers / payees in one period, that
116
- adjustment can occur once per settlement batch.
111
+ For low-count Nano batches, the ceiling can make the effective rounded debit per
112
+ SDRP Tx higher than the decimal provider usage amount. Here, `Tx` means one
113
+ accepted SDRP payment, not an on-chain settlement transaction. The protocol fee
114
+ remains the decimal statement amount and is deducted from provider receivable;
115
+ the extra integer-minor-unit adjustment is recorded as `rounding_delta_minor` on
116
+ the settlement batch. Each settlement batch can add a positive rounding
117
+ adjustment of less than 1 token minor unit; if a buyer uses many providers /
118
+ payees in one period, that adjustment can occur once per settlement batch.
117
119
 
118
120
  `rounding_delta_minor` belongs to the buyer debit and Siglume's rounding
119
- adjustment accounting for that batch. It is not provider revenue. Provider
120
- reports should use `provider_receivable_minor`,
121
+ adjustment accounting for that batch. It is not provider revenue.
122
+ `protocol_fee_minor` is provider-borne and is not added to the buyer debit.
123
+ Provider reports should use `provider_receivable_minor`,
121
124
  `settled_provider_receivable_minor`, `unsettled_provider_receivable_minor`, and
122
125
  `past_due_provider_receivable_minor`.
123
126
 
@@ -145,8 +148,8 @@ They return `{items, next_cursor}`.
145
148
  Buyer usage event amount fields:
146
149
 
147
150
  - `provider_usage_amount_minor`: provider price for the usage event
148
- - `protocol_fee_minor`: metered protocol fee
149
- - `gross_buyer_debit_minor`: expected buyer debit for the event
151
+ - `protocol_fee_minor`: provider-borne metered protocol fee
152
+ - `gross_buyer_debit_minor`: provider usage amount before integer-token rounding
150
153
  - `expected_scheduled_debit_at`: derived schedule for an open period before a
151
154
  settlement batch exists
152
155
 
@@ -172,7 +175,7 @@ Buyer batch amount fields:
172
175
 
173
176
  - `estimated_buyer_debit_minor`: total buyer debit for the batch
174
177
  - `provider_usage_amount_minor`: provider usage amount before protocol fee
175
- - `gross_buyer_debit_minor`: provider usage amount plus protocol fee
178
+ - `gross_buyer_debit_minor`: provider usage amount before integer-token rounding
176
179
  - `buyer_debit_minor`: amount scheduled for the debit transaction
177
180
 
178
181
  Past-due batches include:
@@ -187,6 +190,18 @@ Buyer-triggered requeue is not part of the MVP. The buyer-facing UI should show
187
190
  the block reason, tell the buyer to repair balance / allowance / BudgetVault /
188
191
  caps, and point them to support with `support_reference`.
189
192
 
193
+ Threshold-control fields:
194
+
195
+ - `settlement_trigger`: `amount_threshold` or `scheduled_close`
196
+ - `settlement_threshold_minor`: JPY `10000` or USD `10000` minor units
197
+ - `threshold_reached_at`: set when the fixed amount threshold closed the batch
198
+ - `total_unsettled_exposure_minor`: open plus `notice_pending`, `ready`,
199
+ `submitted`, retrying, and `past_due` provider gross exposure for the same
200
+ buyer / provider / token
201
+
202
+ JPY 10,000 and USD 100.00 are market-specific fixed thresholds, not FX
203
+ conversions of one another.
204
+
190
205
  ## Provider Statement APIs
191
206
 
192
207
  ### Summary
@@ -298,6 +313,10 @@ Important batch fields:
298
313
  | `status` | Batch lifecycle state such as `notice_pending`, `ready`, `submitted`, `settled`, `failed`, `past_due`, or `notice_delivery_failed` |
299
314
  | `notice_status` | Final debit notice delivery status |
300
315
  | `period_start`, `period_end`, `close_at` | Statement period boundaries |
316
+ | `settlement_trigger` | `amount_threshold` for early threshold close, or `scheduled_close` for weekly/monthly close |
317
+ | `settlement_threshold_minor` | Fixed market threshold for early settlement: JPY `10000` or USD `10000` minor units |
318
+ | `threshold_reached_at` | Timestamp when the fixed threshold closed the batch, otherwise null |
319
+ | `total_unsettled_exposure_minor` | Current open plus notice/ready/submitted/retrying/past-due provider gross exposure for the same buyer / provider / token |
301
320
  | `expected_scheduled_debit_at` | Expected debit time for an open period before a batch exists |
302
321
  | `scheduled_debit_at` | Scheduled debit time after batch creation |
303
322
  | `not_before_attempt_at` | Earliest allowed debit attempt; this is the close-plus-3-day gate |
@@ -305,12 +324,13 @@ Important batch fields:
305
324
  | `latest_execution_attempt_status` | Latest non-sensitive execution attempt status |
306
325
  | `chain_receipt_id` | On-chain receipt id when available |
307
326
  | `usage_event_digest` | Digest of usage rows included in the batch |
308
- | `provider_receivable_minor` | Provider amount for the batch |
309
- | `settled_provider_receivable_minor` | Provider amount that is settled on-chain |
310
- | `unsettled_provider_receivable_minor` | Provider amount not yet settled |
311
- | `past_due_provider_receivable_minor` | Provider amount blocked on past-due settlement |
312
- | `gross_buyer_debit_minor` | Provider amount plus protocol fee |
313
- | `protocol_fee_minor` | Micro / Nano protocol fee |
327
+ | `provider_usage_amount_minor` | Provider usage amount before protocol fee |
328
+ | `provider_receivable_minor` | Provider amount for the batch after provider-borne protocol fee |
329
+ | `settled_provider_receivable_minor` | Provider receivable that is settled on-chain |
330
+ | `unsettled_provider_receivable_minor` | Provider receivable not yet settled |
331
+ | `past_due_provider_receivable_minor` | Provider receivable blocked on past-due settlement |
332
+ | `gross_buyer_debit_minor` | Provider usage amount before integer-token rounding |
333
+ | `protocol_fee_minor` | Micro / Nano protocol fee deducted from provider receivable |
314
334
  | `buyer_debit_minor` | Amount scheduled for the buyer debit |
315
335
  | `attempt_count`, `next_attempt_at` | Retry state |
316
336
  | `failure_reason_code`, `failure_reason_label`, `failure_reason_help` | Sanitized public failure reason |
@@ -330,7 +350,7 @@ curl https://siglume.com/v1/sdrp/metered/provider/settlement-batches/<batch-id>/
330
350
  The CSV contains exactly these columns:
331
351
 
332
352
  ```text
333
- metered_usage_id,created_at,plan_type,settlement_cadence,period_start,period_end,listing_id,capability_key,operation_key,currency,token_symbol,provider_receivable_minor,protocol_fee_minor,gross_buyer_debit_minor,rounding_delta_minor,buyer_debit_minor,status,settlement_batch_id,buyer_period_ref
353
+ metered_usage_id,created_at,plan_type,settlement_cadence,period_start,period_end,listing_id,capability_key,operation_key,currency,token_symbol,provider_usage_amount_minor,provider_receivable_minor,protocol_fee_minor,gross_buyer_debit_minor,rounding_delta_minor,buyer_debit_minor,status,settlement_batch_id,buyer_period_ref
334
354
  ```
335
355
 
336
356
  The CSV uses `buyer_period_ref`, not `buyer_user_id`.
@@ -371,9 +391,10 @@ Siglume retries failed Micro / Nano settlement every 6 hours for up to 28
371
391
  automatic attempts. After that the batch remains `past_due` until operator
372
392
  requeue.
373
393
 
374
- New Micro / Nano usage for the same buyer, plan type, and token is paused while
375
- the past-due block remains. The provider API is not called for the rejected
376
- request, and the request is not charged.
394
+ New Micro / Nano usage for the same buyer / provider / token is paused while
395
+ the total unsettled exposure is at or above the fixed threshold, and while a
396
+ failed or past-due block remains. The provider API is not called for the
397
+ rejected request, and the request is not charged.
377
398
 
378
399
  Public failure fields are sanitized. Show `failure_reason_code`,
379
400
  `failure_reason_label`, `failure_reason_help`, and `support_reference` to users
package/docs/pricing.md CHANGED
@@ -34,18 +34,19 @@ charging.
34
34
  | Public one-time payment amount | Applied automatically | What you select | Fee | Settlement |
35
35
  | --- | --- | --- | --- | --- |
36
36
  | 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 |
37
- | JPY 50-500 / USD 0.31-3.00 | Micro Payment | Applied automatically by amount | USD 0.01 / SDRP Tx, about JPY 2 | Aggregated and settled **weekly** (see [Settlement schedule](#settlement-schedule)) |
38
- | JPY 1-49 / USD 0.01-0.30 | Nano Payment | Applied automatically by amount | USD 0.001 / SDRP Tx, about JPY 0.2 | Aggregated and settled **monthly** (see [Settlement schedule](#settlement-schedule)) |
37
+ | JPY 50-500 / USD 0.31-3.00 | Micro Payment | Applied automatically by amount | JPY 2 / USD 0.01 per SDRP Tx | Aggregated and settled **weekly**, or earlier once the buyer/payee batch reaches JPY 10,000 / USD 100.00 (see [Settlement schedule](#settlement-schedule)) |
38
+ | JPY 1-49 / USD 0.01-0.30 | Nano Payment | Applied automatically by amount | JPY 0.2 / USD 0.001 per SDRP Tx | Aggregated and settled **monthly**, or earlier once the buyer/payee batch reaches JPY 10,000 / USD 100.00 (see [Settlement schedule](#settlement-schedule)) |
39
39
 
40
40
  In this table, `Tx` means one accepted SDRP payment, not an on-chain settlement
41
41
  transaction. Micro / Nano settlement batches are aggregated on-chain after the
42
- weekly or monthly close.
42
+ weekly or monthly close, or earlier when the fixed amount threshold is reached.
43
43
 
44
44
  Standard Payment settles per payment. Micro Payment and Nano Payment are
45
- aggregated and settled in account-assigned weekly / monthly slots - see
46
- [Settlement schedule](#settlement-schedule) for how each band closes, when the
47
- pre-debit notice window elapses, when revenue becomes settled, and how rejected
48
- requests behave.
45
+ aggregated and settled in account-assigned weekly / monthly slots, with early
46
+ settlement when the same buyer/payee/token/period batch reaches JPY 10,000 or
47
+ USD 100.00. See [Settlement schedule](#settlement-schedule) for how each band
48
+ closes, when the pre-debit notice window elapses, when revenue becomes settled,
49
+ and how rejected requests behave.
49
50
 
50
51
  The current public API chooses the band from `amount_minor`; JPY 500-and-under /
51
52
  USD 3-and-under payments are routed to Micro / Nano delayed aggregated
@@ -71,11 +72,12 @@ If no paid plan is selected during merchant setup, the merchant account uses the
71
72
  Launch plan. A merchant billing mandate is still required before accepting
72
73
  payments so Siglume can collect the monthly base fee automatically.
73
74
 
74
- Standard Payment fees are deducted at settlement, so the merchant receives the
75
- net amount for each Standard payment. Micro / Nano protocol fees are different:
76
- they are added to the buyer debit, are reported as `protocol_fee_minor`, and are
77
- not provider revenue. Monthly base fees are collected separately through the
78
- merchant billing mandate.
75
+ All SDRP payment fees are seller-borne. Standard Payment fees are deducted at
76
+ settlement, so the merchant receives the net amount for each Standard payment.
77
+ Micro / Nano protocol fees are deducted from provider receivable at aggregated
78
+ settlement, are reported as `protocol_fee_minor`, and are not added to the buyer
79
+ debit. Monthly base fees are collected separately through the merchant billing
80
+ mandate.
79
81
 
80
82
  The same Standard Payment percentage schedule applies in JPY and USD. For
81
83
  Standard Payment, the Siglume platform returns `fee_bps` in the merchant's
@@ -93,23 +95,29 @@ confirmed payment turns into money in your settlement wallet.
93
95
  | Band | Cadence | Period | You are paid |
94
96
  | --- | --- | --- | --- |
95
97
  | Standard Payment | Per payment | n/a | On-chain, immediately after each payment confirms |
96
- | Micro Payment | Weekly | Account-assigned fixed weekly slot in the buyer settlement timezone; the assigned close time is visible through the statement APIs | After the period closes and the roughly 3-day pre-debit notice window has elapsed, in aggregated on-chain settlement(s) grouped per buyer, payee, token, and period |
97
- | Nano Payment | Monthly | Account-assigned fixed monthly slot in the buyer settlement timezone; the assigned close time is visible through the statement APIs | After the period closes and the roughly 3-day pre-debit notice window has elapsed, in aggregated on-chain settlement(s) grouped per buyer, payee, token, and period |
98
+ | Micro Payment | Weekly, with early threshold settlement | Account-assigned fixed weekly slot in the buyer settlement timezone; the assigned close time is visible through the statement APIs. If a buyer/payee/token/period batch reaches JPY 10,000 or USD 100.00 first, Siglume can close that batch early. | After the period closes or the fixed amount threshold is reached, and the roughly 3-day pre-debit notice window has elapsed, in aggregated on-chain settlement(s) grouped per buyer, payee, token, and period |
99
+ | Nano Payment | Monthly, with early threshold settlement | Account-assigned fixed monthly slot in the buyer settlement timezone; the assigned close time is visible through the statement APIs. If a buyer/payee/token/period batch reaches JPY 10,000 or USD 100.00 first, Siglume can close that batch early. | After the period closes or the fixed amount threshold is reached, and the roughly 3-day pre-debit notice window has elapsed, in aggregated on-chain settlement(s) grouped per buyer, payee, token, and period |
98
100
 
99
101
  ### Micro weekly settlement
100
102
 
101
103
  - **Closing period.** Micro-band payments accrue across one weekly period. The
102
104
  specific closing weekday and time are assigned as a fixed slot per account to
103
105
  spread settlement load.
106
+ - **Early threshold settlement.** If a buyer/payee/token batch reaches JPY
107
+ 10,000 or USD 100.00 before the weekly close, Siglume can close that batch
108
+ early and start the same final-notice and settlement flow. JPY 10,000 and USD
109
+ 100.00 are market-specific fixed thresholds, not FX conversions of one
110
+ another.
104
111
  - **Timezone.** Period boundaries are evaluated in the buyer's configured
105
112
  settlement timezone, defaulting to UTC. Assigned slots are persisted and are
106
113
  not recalculated on the fly.
107
- - **Settlement.** After the week closes, Siglume aggregates that week's Micro
114
+ - **Settlement.** After the week closes or the early threshold is reached,
115
+ Siglume aggregates the Micro
108
116
  payments — grouped per buyer, payee, token, and period — into on-chain
109
117
  settlement(s). Siglume sends the final debit notice first; the on-chain debit
110
118
  is not attempted until the scheduled attempt time after an approximately
111
119
  3-day pre-debit notice window (`not_before_attempt_at`).
112
- - **Revenue recognition.** A Micro payment is final only once its weekly
120
+ - **Revenue recognition.** A Micro payment is final only once its aggregated
113
121
  settlement confirms on-chain. Until then it is accrued, not settled.
114
122
 
115
123
  ### Nano monthly settlement
@@ -117,15 +125,21 @@ confirmed payment turns into money in your settlement wallet.
117
125
  - **Closing period.** Nano-band payments accrue across one monthly period. The
118
126
  specific closing day and time are assigned as a fixed slot per account to
119
127
  spread settlement load.
128
+ - **Early threshold settlement.** If a buyer/payee/token batch reaches JPY
129
+ 10,000 or USD 100.00 before the monthly close, Siglume can close that batch
130
+ early and start the same final-notice and settlement flow. JPY 10,000 and USD
131
+ 100.00 are market-specific fixed thresholds, not FX conversions of one
132
+ another.
120
133
  - **Timezone.** As with Micro, period boundaries use the buyer's configured
121
134
  settlement timezone, defaulting to UTC. Assigned slots are persisted and are
122
135
  not recalculated on the fly.
123
- - **Settlement.** After the month closes, Siglume aggregates that month's Nano
136
+ - **Settlement.** After the month closes or the early threshold is reached,
137
+ Siglume aggregates the Nano
124
138
  payments — grouped per buyer, payee, token, and period — into on-chain
125
139
  settlement(s). Siglume sends the final debit notice first; the on-chain debit
126
140
  is not attempted until the scheduled attempt time after an approximately
127
141
  3-day pre-debit notice window (`not_before_attempt_at`).
128
- - **Revenue recognition.** A Nano payment is final only once its monthly
142
+ - **Revenue recognition.** A Nano payment is final only once its aggregated
129
143
  settlement confirms on-chain.
130
144
 
131
145
  ### Failures, retries, and carry-over
@@ -137,9 +151,12 @@ confirmed payment turns into money in your settlement wallet.
137
151
  the affected batch is treated as past due. Siglume currently retries every 6
138
152
  hours for up to 28 automatic attempts. After that, the batch remains past due
139
153
  and requires manual resolution before another attempt.
140
- - While a buyer has an unresolved failed Micro/Nano settlement for the same
141
- payment band and token, new Micro/Nano usage is paused with the machine-readable
142
- error `METERED_SETTLEMENT_PAST_DUE`; the provider API is not called.
154
+ - While the same buyer / provider / token has total unsettled exposure at or
155
+ above the fixed threshold, new Micro/Nano usage is paused with the
156
+ machine-readable error `METERED_SETTLEMENT_PAST_DUE`; the provider API is not
157
+ called. Exposure includes open usage plus `notice_pending`, `ready`,
158
+ `submitted`, retrying, and `past_due` batches, and remains paused while
159
+ settlement failure or `past_due` is unresolved.
143
160
  - Outstanding amounts remain attached to the failed settlement and are retried
144
161
  under this policy. They are not settled revenue, and Siglume does not advance,
145
162
  guarantee, or insure provider revenue before on-chain settlement succeeds.
@@ -150,8 +167,9 @@ confirmed payment turns into money in your settlement wallet.
150
167
 
151
168
  Micro and Nano run a budget check before the buyer's paid request is fulfilled:
152
169
 
153
- - A buyer's wallet budget reservation is consumed at the **gross amount** (your
154
- price plus the protocol fee) from acceptance until settlement confirms. This
170
+ - A buyer's wallet budget reservation is consumed at the **gross buyer debit
171
+ amount** (your usage price, before any provider-borne protocol fee) from
172
+ acceptance until settlement confirms. This
155
173
  is a reservation against Siglume spending limits; it does not lock, escrow,
156
174
  preserve, or guarantee the buyer's token balance, allowance, BudgetVault
157
175
  authorization, or payment source.
@@ -166,14 +184,15 @@ Micro and Nano run a budget check before the buyer's paid request is fulfilled:
166
184
 
167
185
  ### What is fixed vs platform-managed
168
186
 
169
- The cadence is fixed: **Micro settles weekly, Nano settles monthly**, and a
170
- payment is final only after its on-chain settlement confirms. Micro and Nano are
171
- automatic amount bands, not customer-selected options. The account-assigned
172
- period boundaries, roughly 3-day pre-debit notice window, and current retry policy
173
- above are the public behavior as of 2026-06-18. Treat the platform's statement
174
- status, `not_before_attempt_at`, Standard `fee_bps`, and Micro / Nano statement
175
- amount fields as authoritative rather than hard-coding local revenue
176
- recognition.
187
+ The cadence fields are fixed: **Micro is weekly, Nano is monthly**. In both
188
+ bands, Siglume can close a buyer/payee/token batch early once it reaches JPY
189
+ 10,000 or USD 100.00. A payment is final only after its on-chain settlement
190
+ confirms. Micro and Nano are automatic amount bands, not customer-selected
191
+ options. The account-assigned period boundaries, roughly 3-day pre-debit notice
192
+ window, early settlement threshold, and current retry policy above are the
193
+ public behavior as of 2026-06-19. Treat the platform's statement status,
194
+ `not_before_attempt_at`, Standard `fee_bps`, and Micro / Nano statement amount
195
+ fields as authoritative rather than hard-coding local revenue recognition.
177
196
 
178
197
  ## Micro / Nano Amount Rounding
179
198
 
@@ -184,7 +203,8 @@ current settlement rule is:
184
203
  ```text
185
204
  provider_usage_amount_minor = sum(provider price minor units for accepted metered rows)
186
205
  protocol_fee_minor = sum(Micro/Nano fixed protocol fee minor units for accepted metered rows)
187
- gross_buyer_debit_minor = provider_usage_amount_minor + protocol_fee_minor
206
+ provider_receivable_minor = max(provider_usage_amount_minor - protocol_fee_minor, 0)
207
+ gross_buyer_debit_minor = provider_usage_amount_minor
188
208
  buyer_debit_minor = ceil(gross_buyer_debit_minor)
189
209
  rounding_delta_minor = buyer_debit_minor - gross_buyer_debit_minor
190
210
  ```
@@ -195,20 +215,23 @@ The rounding mode is ceiling to the next integer token minor unit because
195
215
  on-chain settlement cannot debit fractional JPYC/USDC minor units. The positive
196
216
  `rounding_delta_minor` is part of the buyer debit for that batch and is retained
197
217
  as a rounding adjustment in Siglume's settlement accounting; it is not provider
198
- revenue. Providers should reconcile their revenue with
218
+ revenue. `protocol_fee_minor` is provider-borne and is deducted from provider
219
+ receivable, not added to the buyer debit. Providers should reconcile their
220
+ revenue with
199
221
  `provider_receivable_minor`, `settled_provider_receivable_minor`,
200
222
  `unsettled_provider_receivable_minor`, and
201
223
  `past_due_provider_receivable_minor`, not with `buyer_debit_minor`.
202
224
 
203
225
  For low-count Nano batches, the integer ceiling can make the effective buyer
204
- burden per SDRP Tx higher than the headline USD 0.001 / SDRP Tx protocol fee. The
205
- decimal protocol fee remains visible as `protocol_fee_minor`; the difference
206
- created by integer-token settlement is visible as `rounding_delta_minor` on the
207
- batch. Each settlement batch can add a positive rounding adjustment of less than
208
- 1 token minor unit. If a buyer uses many providers / payees in one period, that
209
- adjustment can occur once per settlement batch. JavaScript integrations should
210
- not sum Micro / Nano minor amounts with `number`; use a decimal library. Python
211
- integrations should use `Decimal`.
226
+ rounded debit per SDRP Tx higher than the decimal provider usage amount. The
227
+ decimal protocol fee remains visible as `protocol_fee_minor` and is deducted
228
+ from provider receivable; the difference created by integer-token settlement is
229
+ visible as `rounding_delta_minor` on the batch. Each settlement batch can add a
230
+ positive rounding adjustment of less than 1 token minor unit. If a buyer uses
231
+ many providers / payees in one period, that adjustment can occur once per
232
+ settlement batch. JavaScript integrations should not sum Micro / Nano minor
233
+ amounts with `number`; use a decimal library. Python integrations should use
234
+ `Decimal`.
212
235
 
213
236
  ## Statement APIs and Notices
214
237
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@siglume/direct-request-payment",
3
- "version": "0.4.12",
3
+ "version": "0.4.14",
4
4
  "description": "SDK for the Siglume Direct Request Payment SDRP payment protocol",
5
5
  "keywords": [
6
6
  "siglume",