@openrails/billing-ui 0.236.0 → 0.237.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.
Files changed (44) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/README.md +37 -67
  3. package/dist/account/account-billing.d.ts +1 -1
  4. package/dist/account/payment-methods-panel.d.ts +1 -1
  5. package/dist/buy-button.d.ts +14 -9
  6. package/dist/client/client.d.ts +25 -13
  7. package/dist/client/generated/error-codes.d.ts +1 -1
  8. package/dist/client/generated/routes.d.ts +1 -199
  9. package/dist/client/generated/wire.d.ts +34 -185
  10. package/dist/client/index.d.ts +1 -1
  11. package/dist/client/types.d.ts +72 -141
  12. package/dist/client-D9G1Tgox.js +888 -0
  13. package/dist/client-D9G1Tgox.js.map +1 -0
  14. package/dist/client.js +2 -2
  15. package/dist/components/eyebrow.d.ts +5 -0
  16. package/dist/embedded-checkout.d.ts +22 -0
  17. package/dist/{hooks-2d-XjpuI.js → hooks-DYepYVMX.js} +2 -2
  18. package/dist/{hooks-2d-XjpuI.js.map → hooks-DYepYVMX.js.map} +1 -1
  19. package/dist/index.d.ts +3 -7
  20. package/dist/index.js +1131 -2150
  21. package/dist/index.js.map +1 -1
  22. package/dist/modal.d.ts +3 -9
  23. package/dist/offers.d.ts +4 -5
  24. package/dist/psp.d.ts +0 -8
  25. package/dist/react.js +1 -1
  26. package/dist/styles.css +1 -1
  27. package/dist/tokenized-card-form.d.ts +5 -1
  28. package/dist/types.d.ts +12 -250
  29. package/docs/payment-form-contract.md +31 -74
  30. package/package.json +1 -2
  31. package/dist/checkout-frame.d.ts +0 -17
  32. package/dist/checkout-page.d.ts +0 -21
  33. package/dist/checkout.d.ts +0 -22
  34. package/dist/client/checkout.d.ts +0 -28
  35. package/dist/client-BuvolBPT.js +0 -1092
  36. package/dist/client-BuvolBPT.js.map +0 -1
  37. package/dist/components/ccbill-fields.d.ts +0 -8
  38. package/dist/components/methods.d.ts +0 -13
  39. package/dist/components/summary.d.ts +0 -12
  40. package/dist/fixtures.d.ts +0 -9
  41. package/dist/frame.d.ts +0 -47
  42. package/dist/lib/rail-meta.d.ts +0 -15
  43. package/dist/lib/redirect.d.ts +0 -2
  44. package/dist/source.d.ts +0 -5
@@ -8,8 +8,12 @@ export type Balance = {
8
8
  billing_mode: "arrears" | "prepaid";
9
9
  balance_amount: string;
10
10
  held_amount: string;
11
+ accrued_amount: string;
11
12
  available_amount: string;
12
13
  owed_amount: string;
14
+ accrual_rate_per_hour: string;
15
+ as_of: string;
16
+ depletes_at: string | null;
13
17
  };
14
18
  export type BalanceTransaction = {
15
19
  id: string;
@@ -49,13 +53,6 @@ export type CaptchaConfig = {
49
53
  action: string;
50
54
  token_header: string;
51
55
  };
52
- export type CaptchaStatus = {
53
- enabled: boolean;
54
- required: boolean;
55
- provider: string | null;
56
- token_header: string;
57
- client_script_url: string;
58
- };
59
56
  export type CardDetails = {
60
57
  brand: string | null;
61
58
  last4: string | null;
@@ -76,71 +73,6 @@ export type Cart = {
76
73
  last_changed_at: string | null;
77
74
  expires_at: string | null;
78
75
  };
79
- export type CheckoutSession = {
80
- id: string;
81
- status: string;
82
- merchant: CheckoutSessionMerchant;
83
- plan: CheckoutSessionPlan;
84
- line_items: CheckoutSessionLineItem[];
85
- tax: string | null;
86
- due_today: string | null;
87
- options: CheckoutSessionOption[];
88
- saved_methods: CheckoutSessionSavedMethod[];
89
- next_action: NextAction | null;
90
- operation: PaymentOperation | null;
91
- payment_id: string | null;
92
- subscription_id: string | null;
93
- failure_message: string | null;
94
- failure: PaymentFailure | null;
95
- success_url: string | null;
96
- embed_origin: string | null;
97
- expires_at: string;
98
- };
99
- export type CheckoutSessionLineItem = {
100
- label: string;
101
- sublabel: string | null;
102
- amount: string;
103
- };
104
- export type CheckoutSessionLink = {
105
- id: string;
106
- url: string | null;
107
- expires_at: string;
108
- };
109
- export type CheckoutSessionMerchant = {
110
- display_name: string;
111
- };
112
- export type CheckoutSessionOption = {
113
- id: string;
114
- psp_id: string;
115
- rail: string;
116
- mode: string;
117
- driver: string;
118
- public_config: Record<string, string> | null;
119
- };
120
- export type CheckoutSessionPayResult = {
121
- status: string;
122
- next_action: NextAction | null;
123
- operation: PaymentOperation | null;
124
- payment_id: string | null;
125
- subscription_id: string | null;
126
- failure_message: string | null;
127
- failure: PaymentFailure | null;
128
- };
129
- export type CheckoutSessionPlan = {
130
- auto_renew: boolean;
131
- display_name: string;
132
- unit_amount: string;
133
- currency: string;
134
- unit_decimals: number;
135
- billing_interval_hours: number | null;
136
- access_duration_hours: number | null;
137
- };
138
- export type CheckoutSessionSavedMethod = {
139
- id: string;
140
- option_id: string;
141
- rail: string;
142
- card: CardDetails | null;
143
- };
144
76
  export type CreateMyOrderParams = {
145
77
  lines?: OrderLineParams[];
146
78
  cart?: boolean;
@@ -219,62 +151,10 @@ export type DriftField = {
219
151
  export type Health = {
220
152
  status: "ok" | "ready";
221
153
  };
222
- export type Invoice = {
223
- id: string;
224
- customer_id: string;
225
- currency: string;
226
- invoice_number: string | null;
227
- period_starts_at: string;
228
- period_ends_at: string;
229
- usage_total: string;
230
- deposits_total: string;
231
- owed_accrued: string;
232
- owed_paid: string;
233
- closing_balance: string;
234
- subtotal_amount: string;
235
- total_amount: string;
236
- amount_paid: string;
237
- amount_due: string;
238
- line_items: InvoiceLineItem[];
239
- money_movements: Record<string, string> | null;
240
- po_number: string | null;
241
- tax: Record<string, unknown> | null;
242
- billing_contacts: InvoiceContact[];
243
- memo: string | null;
244
- status: "draft" | "open" | "paid" | "uncollectible" | "voided";
245
- collection_method: "charge_automatically" | "send_invoice";
246
- issued_at: string | null;
247
- due_at: string | null;
248
- delinquent: boolean;
249
- paid_at: string | null;
250
- voided_at: string | null;
251
- uncollectible_at: string | null;
252
- finalized_at: string | null;
253
- external_invoice_id: string | null;
254
- collection_failure_count: number;
255
- collection_failed_at: string | null;
256
- next_collection_attempt_at: string | null;
257
- last_collection_failure_code: string | null;
258
- recovery: PaymentRecovery | null;
259
- available_actions: ("mark_uncollectible" | "record_payment" | "retry_collection" | "void")[];
260
- created_at: string;
261
- };
262
154
  export type InvoiceContact = {
263
155
  name: string;
264
156
  email: string;
265
157
  };
266
- export type InvoiceLineItem = {
267
- event_type: string;
268
- amount: string;
269
- count: number;
270
- dimensions: Record<string, number> | null;
271
- };
272
- export type InvoicePayNow = {
273
- invoice: Invoice;
274
- payment_id: string | null;
275
- operation: PaymentOperation;
276
- replayed: boolean;
277
- };
278
158
  export type Mandate = {
279
159
  id: string;
280
160
  customer_id: string;
@@ -298,14 +178,6 @@ export type MarkNotificationsReadParams = {
298
178
  notification_ids?: string[];
299
179
  all?: boolean;
300
180
  };
301
- export type MintCheckoutSessionParams = {
302
- price_id?: string;
303
- price_key?: string;
304
- product_key?: string;
305
- amount?: string;
306
- auto_renew?: boolean;
307
- success_url?: string;
308
- };
309
181
  export type NetworkLinkChallenge = {
310
182
  id: string;
311
183
  nonce: string;
@@ -346,12 +218,10 @@ export type NotificationData = {
346
218
  downgrade_applied?: boolean;
347
219
  new_product?: string;
348
220
  overdue_amount?: string;
349
- overdue_invoices?: number;
221
+ overdue_orders?: number;
350
222
  overdue_started_at?: string;
351
223
  from_state?: string;
352
224
  to_state?: string;
353
- invoice_id?: string;
354
- invoice_number?: string;
355
225
  amount_due?: string;
356
226
  due_at?: string;
357
227
  failure_code?: string;
@@ -373,8 +243,8 @@ export type NotificationData = {
373
243
  export type Order = {
374
244
  id: string;
375
245
  customer_id: string;
376
- origin: "customer" | "merchant" | "subscription";
377
- status: "canceled" | "complete" | "expired" | "open" | "processing" | "void";
246
+ origin: "customer" | "merchant" | "subscription" | "usage";
247
+ status: "canceled" | "complete" | "expired" | "open" | "processing" | "uncollectible" | "void";
378
248
  number: string | null;
379
249
  currency: string;
380
250
  total: string;
@@ -383,15 +253,18 @@ export type Order = {
383
253
  payment_options: OrderPaymentOption[];
384
254
  checkout: OrderCheckout | null;
385
255
  renewal: OrderRenewal | null;
256
+ usage: OrderUsage | null;
386
257
  expires_at: string | null;
387
258
  completed_at: string | null;
388
259
  canceled_at: string | null;
389
260
  expired_at: string | null;
390
261
  voided_at: string | null;
262
+ uncollectible_at: string | null;
391
263
  created_at: string;
392
264
  };
393
265
  export type OrderCheckout = {
394
266
  url: string | null;
267
+ ui_mode: "embedded" | "hosted";
395
268
  expires_at: string;
396
269
  success_url: string;
397
270
  cancel_url: string | null;
@@ -399,13 +272,14 @@ export type OrderCheckout = {
399
272
  };
400
273
  export type OrderLine = {
401
274
  id: string;
402
- price_id: string;
403
- product_id: string;
275
+ price_id: string | null;
276
+ product_id: string | null;
277
+ source: string | null;
404
278
  description: string;
405
279
  quantity: number | null;
406
280
  unit_amount: string;
407
281
  amount: string;
408
- ownership: "consumable" | "extend" | "unique";
282
+ ownership: "consumable" | "extend" | "unique" | null;
409
283
  billing_interval_hours: number | null;
410
284
  access_duration_hours: number | null;
411
285
  subscription_id: string | null;
@@ -466,6 +340,20 @@ export type OrderRenewal = {
466
340
  period_ends_at: string;
467
341
  due_at: string;
468
342
  };
343
+ export type OrderUsage = {
344
+ period_starts_at: string;
345
+ period_ends_at: string;
346
+ due_at: string;
347
+ amount_paid: string;
348
+ amount_due: string;
349
+ collection_method: "charge_automatically" | "send_invoice";
350
+ next_collection_attempt_at: string | null;
351
+ po_number: string | null;
352
+ memo: string | null;
353
+ tax: Record<string, unknown> | null;
354
+ billing_contacts: InvoiceContact[];
355
+ delinquent: boolean;
356
+ };
469
357
  export type PSPLinkState = {
470
358
  status: "error" | "linked" | "pending_manual_link" | "sync_disabled";
471
359
  ids: Record<string, string> | null;
@@ -486,17 +374,6 @@ export type PSPPaymentConfig = {
486
374
  status?: string;
487
375
  retry_after?: number;
488
376
  };
489
- export type PayCheckoutSessionParams = {
490
- option_id?: string;
491
- payment_method_id?: string;
492
- payment_token?: string;
493
- card?: CardEntry;
494
- billing_details?: BillingDetails;
495
- token_symbol?: string;
496
- };
497
- export type PayInvoiceParams = {
498
- payment_method_id?: string;
499
- };
500
377
  export type PayOrderParams = {
501
378
  payment?: OrderPaymentParams;
502
379
  expected_total?: string;
@@ -512,7 +389,6 @@ export type Payment = {
512
389
  customer_id: string;
513
390
  subscription_id: string | null;
514
391
  order_id: string | null;
515
- invoice_id: string | null;
516
392
  quantity: number | null;
517
393
  price_id: string | null;
518
394
  price: Price | null;
@@ -643,11 +519,17 @@ export type PublicConfig = {
643
519
  payment: PaymentConfig | null;
644
520
  merchant: PublicMerchant | null;
645
521
  captcha: CaptchaConfig | null;
522
+ network: PublicNetwork | null;
646
523
  };
647
524
  export type PublicMerchant = {
648
525
  display_name: string;
649
526
  logo_url: string | null;
650
527
  support_url: string | null;
528
+ embed_origins: string[];
529
+ };
530
+ export type PublicNetwork = {
531
+ issuer: string;
532
+ client_id: string;
651
533
  };
652
534
  export type Quantity = {
653
535
  min: number;
@@ -659,11 +541,6 @@ export type RailDefinition = {
659
541
  credential_keys: string[];
660
542
  setting_keys: string[];
661
543
  };
662
- export type ReplacePaymentMethodCardParams = {
663
- payment_token?: string;
664
- card?: CardEntry;
665
- billing_details?: BillingDetails;
666
- };
667
544
  export type RetrySubscriptionNowParams = {
668
545
  payment_method_id?: string;
669
546
  };
@@ -809,34 +686,6 @@ export type SubscriptionRetryNowResult = {
809
686
  operation: PaymentOperation;
810
687
  replayed: boolean;
811
688
  };
812
- export type SupportedTokensResponse = {
813
- tokens: TokenInfo[];
814
- };
815
- export type TokenBalance = {
816
- amount: string;
817
- units: string;
818
- sufficient: boolean;
819
- };
820
- export type TokenInfo = {
821
- symbol: string;
822
- name: string;
823
- mint: string;
824
- decimals: number;
825
- price?: string;
826
- preferred: boolean;
827
- recurring_eligible: boolean;
828
- quote?: TokenQuote;
829
- balance?: TokenBalance;
830
- };
831
- export type TokenQuote = {
832
- amount: string;
833
- units: string;
834
- token_price_usd: string;
835
- fx_rate: string;
836
- fx_currency: string;
837
- quoted_at: string;
838
- expires_at: string;
839
- };
840
689
  export type UpdatePaymentMethodParams = {
841
690
  exp_month?: number;
842
691
  exp_year?: number;
@@ -1,4 +1,4 @@
1
1
  export { CANCEL_REASON_MAX, CANCEL_REASON_MIN, createBillingClient, isWalletAction, isWalletRejection, RETRY_BUDGET_MS, signWalletAction, WalletRejectedError, type BillingClient, type BillingClientOptions, type ListOptions, type OrderResult, type ProductListOptions, type SendSolanaTransaction, type SubscriptionChangeInput, } from './client';
2
2
  export { BillingError, isBillingError, isServerError, readBillingError, toBillingError, type BillingErrorBody, } from './errors';
3
- export type { Account, Balance, CaptchaConfig, CardSummary, Cart, Currency, CurrencyScales, PaymentConfig, PaymentFailure, PublicConfig, PublicMerchant, CheckoutSessionLink, Invoice, ListPage, NewCard, NextAction, Order, OrderLine, OrderLineRefusal, OrderNextAction, OrderPaymentInput, OrderPreviewLine, Page, Payment, PaymentAuthentication, PaymentMethod, PaymentOperation, PaymentRecovery, Price, Product, SolanaToken, Subscription, SubscriptionDunning, SubscriptionProduct, SubscriptionStatus, SubscriptionChange, SubscriptionChangePreview, } from './types';
3
+ export type { Account, Balance, CaptchaConfig, CardSummary, Cart, Currency, CurrencyScales, CustomerLink, PaymentConfig, PaymentFailure, PublicConfig, PublicMerchant, ListPage, NetworkLinkChallenge, NewCard, NextAction, Order, OrderLine, OrderLineRefusal, OrderNextAction, OrderPaymentInput, OrderPreviewLine, Page, Payment, PaymentAuthentication, PaymentMethod, PaymentOperation, PaymentRecovery, Price, Product, Subscription, SubscriptionDunning, SubscriptionProduct, SubscriptionStatus, SubscriptionChange, SubscriptionChangePreview, } from './types';
4
4
  export { amountToDecimal, decimalToAmount, formatAmount, type Amount, } from '../lib/money';
@@ -339,10 +339,15 @@ export declare const orderNextActionSchema: z.ZodObject<{
339
339
  payload: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
340
340
  }, z.core.$strip>;
341
341
  export type OrderNextAction = z.infer<typeof orderNextActionSchema>;
342
+ /**
343
+ * One line of an order. A purchased line names its price and product; a
344
+ * usage order's line names its accrual source (`metered:<meter>`) instead.
345
+ */
342
346
  export declare const orderLineSchema: z.ZodObject<{
343
347
  id: z.ZodString;
344
- price_id: z.ZodString;
345
- product_id: z.ZodString;
348
+ price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
349
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
346
351
  description: z.ZodString;
347
352
  quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
348
353
  unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
@@ -354,11 +359,12 @@ export declare const orderLineSchema: z.ZodObject<{
354
359
  }, z.core.$strip>;
355
360
  export type OrderLine = z.infer<typeof orderLineSchema>;
356
361
  /**
357
- * A purchase, or a subscription's renewal (`origin: subscription`): frozen
358
- * lines and total, read and paid by its own customer. `status` is the
359
- * order's (`open | processing | complete | canceled | expired | void`);
360
- * `payment.status` its payment's (`requires_payment_method |
361
- * requires_action | processing | succeeded`).
362
+ * A purchase, a subscription's renewal (`origin: subscription`) or usage
363
+ * billed in arrears (`origin: usage`): frozen lines and total, read and paid
364
+ * by its own customer. `status` is the order's (`open | processing |
365
+ * complete | canceled | expired | void | uncollectible`); `payment.status`
366
+ * its payment's (`requires_payment_method | requires_action | processing |
367
+ * succeeded`).
362
368
  */
363
369
  export declare const orderSchema: z.ZodObject<{
364
370
  id: z.ZodString;
@@ -370,8 +376,9 @@ export declare const orderSchema: z.ZodObject<{
370
376
  total: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
371
377
  lines: z.ZodArray<z.ZodObject<{
372
378
  id: z.ZodString;
373
- price_id: z.ZodString;
374
- product_id: z.ZodString;
379
+ price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
+ source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
375
382
  description: z.ZodString;
376
383
  quantity: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
377
384
  unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
@@ -413,6 +420,11 @@ export declare const orderSchema: z.ZodObject<{
413
420
  }[] | null | undefined>>;
414
421
  checkout: z.ZodOptional<z.ZodNullable<z.ZodObject<{
415
422
  url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
423
+ ui_mode: z.ZodCatch<z.ZodEnum<{
424
+ embedded: "embedded";
425
+ hosted: "hosted";
426
+ }>>;
427
+ expires_at: z.ZodString;
416
428
  success_url: z.ZodString;
417
429
  cancel_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
418
430
  saved_payment_methods: z.ZodBoolean;
@@ -423,11 +435,24 @@ export declare const orderSchema: z.ZodObject<{
423
435
  period_ends_at: z.ZodString;
424
436
  due_at: z.ZodString;
425
437
  }, z.core.$strip>>>;
438
+ usage: z.ZodOptional<z.ZodNullable<z.ZodObject<{
439
+ period_starts_at: z.ZodString;
440
+ period_ends_at: z.ZodString;
441
+ due_at: z.ZodString;
442
+ amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
443
+ amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
444
+ collection_method: z.ZodString;
445
+ next_collection_attempt_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
446
+ po_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
447
+ memo: z.ZodOptional<z.ZodNullable<z.ZodString>>;
448
+ delinquent: z.ZodBoolean;
449
+ }, z.core.$strip>>>;
426
450
  expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
451
  completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
428
452
  canceled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
429
453
  expired_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
430
454
  voided_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
455
+ uncollectible_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
431
456
  created_at: z.ZodString;
432
457
  }, z.core.$strip>;
433
458
  export type Order = z.infer<typeof orderSchema>;
@@ -671,14 +696,23 @@ export declare const paymentSchema: z.ZodObject<{
671
696
  }, z.core.$strip>>>;
672
697
  }, z.core.$strip>;
673
698
  export type Payment = z.infer<typeof paymentSchema>;
674
- /** A customer's money in one currency. */
699
+ /**
700
+ * A customer's money in one currency, as of `as_of`. `accrued_amount` is what
701
+ * its running charges have charged and the ledger does not hold yet, already
702
+ * taken off `available_amount`; until `depletes_at` (null with no running
703
+ * charge) show `available_amount - accrual_rate_per_hour x hours since as_of`.
704
+ */
675
705
  export declare const balanceSchema: z.ZodObject<{
676
706
  currency: z.ZodString;
677
707
  billing_mode: z.ZodString;
678
708
  balance_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
679
709
  held_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
710
+ accrued_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
680
711
  available_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
681
712
  owed_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
713
+ accrual_rate_per_hour: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
714
+ as_of: z.ZodString;
715
+ depletes_at: z.ZodNullable<z.ZodString>;
682
716
  }, z.core.$strip>;
683
717
  export type Balance = z.infer<typeof balanceSchema>;
684
718
  /**
@@ -692,8 +726,12 @@ export declare const accountSchema: z.ZodObject<{
692
726
  billing_mode: z.ZodString;
693
727
  balance_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
694
728
  held_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
729
+ accrued_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
695
730
  available_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
696
731
  owed_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
732
+ accrual_rate_per_hour: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
733
+ as_of: z.ZodString;
734
+ depletes_at: z.ZodNullable<z.ZodString>;
697
735
  }, z.core.$strip>>;
698
736
  default_payment_methods: z.ZodArray<z.ZodObject<{
699
737
  currency: z.ZodString;
@@ -702,33 +740,6 @@ export declare const accountSchema: z.ZodObject<{
702
740
  unread_notifications: z.ZodNumber;
703
741
  }, z.core.$strip>;
704
742
  export type Account = z.infer<typeof accountSchema>;
705
- export declare const invoiceSchema: z.ZodObject<{
706
- id: z.ZodString;
707
- currency: z.ZodString;
708
- invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
709
- period_starts_at: z.ZodString;
710
- period_ends_at: z.ZodString;
711
- total_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
712
- amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
713
- amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
714
- status: z.ZodString;
715
- issued_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
716
- due_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
717
- delinquent: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
718
- paid_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
719
- recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
720
- last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
721
- retryable: z.ZodBoolean;
722
- blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
723
- operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
724
- id: z.ZodString;
725
- status: z.ZodString;
726
- }, z.core.$strip>>>;
727
- order_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
728
- }, z.core.$strip>>>;
729
- created_at: z.ZodString;
730
- }, z.core.$strip>;
731
- export type Invoice = z.infer<typeof invoiceSchema>;
732
743
  /** Currency code (upper case) to its native-unit scale. */
733
744
  export type CurrencyScales = Readonly<Record<string, number>>;
734
745
  export declare const currencySchema: z.ZodObject<{
@@ -772,99 +783,6 @@ export declare const subscriptionChangeSchema: z.ZodObject<{
772
783
  operation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
773
784
  }, z.core.$strip>;
774
785
  export type SubscriptionChange = z.infer<typeof subscriptionChangeSchema>;
775
- export declare const solanaTokenSchema: z.ZodObject<{
776
- symbol: z.ZodString;
777
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
778
- mint: z.ZodString;
779
- decimals: z.ZodNumber;
780
- price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
781
- preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
782
- recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
783
- quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
784
- amount: z.ZodString;
785
- units: z.ZodString;
786
- token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
787
- fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
788
- fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
789
- quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
790
- expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
791
- }, z.core.$strip>>>;
792
- balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
793
- amount: z.ZodString;
794
- units: z.ZodString;
795
- sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
796
- }, z.core.$strip>>>;
797
- }, z.core.$strip>;
798
- export type SolanaToken = z.infer<typeof solanaTokenSchema>;
799
- export declare const solanaTokensSchema: z.ZodObject<{
800
- tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
801
- symbol: z.ZodString;
802
- name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
803
- mint: z.ZodString;
804
- decimals: z.ZodNumber;
805
- price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
806
- preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
807
- recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
808
- quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
809
- amount: z.ZodString;
810
- units: z.ZodString;
811
- token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
812
- fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
813
- fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
814
- quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
815
- expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
816
- }, z.core.$strip>>>;
817
- balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
818
- amount: z.ZodString;
819
- units: z.ZodString;
820
- sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
821
- }, z.core.$strip>>>;
822
- }, z.core.$strip>>>>, z.ZodTransform<{
823
- symbol: string;
824
- mint: string;
825
- decimals: number;
826
- name?: string | null | undefined;
827
- price?: string | null | undefined;
828
- preferred?: boolean | null | undefined;
829
- recurring_eligible?: boolean | null | undefined;
830
- quote?: {
831
- amount: string;
832
- units: string;
833
- token_price_usd?: string | null | undefined;
834
- fx_rate?: string | null | undefined;
835
- fx_currency?: string | null | undefined;
836
- quoted_at?: string | null | undefined;
837
- expires_at?: string | null | undefined;
838
- } | null | undefined;
839
- balance?: {
840
- amount: string;
841
- units: string;
842
- sufficient?: boolean | null | undefined;
843
- } | null | undefined;
844
- }[], {
845
- symbol: string;
846
- mint: string;
847
- decimals: number;
848
- name?: string | null | undefined;
849
- price?: string | null | undefined;
850
- preferred?: boolean | null | undefined;
851
- recurring_eligible?: boolean | null | undefined;
852
- quote?: {
853
- amount: string;
854
- units: string;
855
- token_price_usd?: string | null | undefined;
856
- fx_rate?: string | null | undefined;
857
- fx_currency?: string | null | undefined;
858
- quoted_at?: string | null | undefined;
859
- expires_at?: string | null | undefined;
860
- } | null | undefined;
861
- balance?: {
862
- amount: string;
863
- units: string;
864
- sufficient?: boolean | null | undefined;
865
- } | null | undefined;
866
- }[] | null | undefined>>;
867
- }, z.core.$strip>;
868
786
  /**
869
787
  * The merchant's browser payment setup: its armed PSPs with their public
870
788
  * values and, with a Solana PSP, the network and accepted tokens a wallet
@@ -958,6 +876,7 @@ export declare const publicMerchantSchema: z.ZodObject<{
958
876
  display_name: z.ZodString;
959
877
  logo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
960
878
  support_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
879
+ embed_origins: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[], string[] | null | undefined>>;
961
880
  }, z.core.$strip>;
962
881
  export type PublicMerchant = z.infer<typeof publicMerchantSchema>;
963
882
  export declare const publicConfigSchema: z.ZodObject<{
@@ -1045,6 +964,7 @@ export declare const publicConfigSchema: z.ZodObject<{
1045
964
  display_name: z.ZodString;
1046
965
  logo_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1047
966
  support_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
967
+ embed_origins: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>, z.ZodTransform<string[], string[] | null | undefined>>;
1048
968
  }, z.core.$strip>>>;
1049
969
  captcha: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1050
970
  provider: z.ZodString;
@@ -1053,8 +973,30 @@ export declare const publicConfigSchema: z.ZodObject<{
1053
973
  action: z.ZodString;
1054
974
  token_header: z.ZodString;
1055
975
  }, z.core.$strip>>>;
976
+ network: z.ZodOptional<z.ZodNullable<z.ZodObject<{
977
+ issuer: z.ZodString;
978
+ client_id: z.ZodString;
979
+ }, z.core.$strip>>>;
1056
980
  }, z.core.$strip>;
1057
981
  export type PublicConfig = z.infer<typeof publicConfigSchema>;
982
+ export declare const networkLinkChallengeSchema: z.ZodObject<{
983
+ id: z.ZodString;
984
+ nonce: z.ZodString;
985
+ expires_at: z.ZodString;
986
+ }, z.core.$strip>;
987
+ export type NetworkLinkChallenge = z.infer<typeof networkLinkChallengeSchema>;
988
+ export declare const customerLinkSchema: z.ZodObject<{
989
+ id: z.ZodString;
990
+ merchant_id: z.ZodString;
991
+ customer_id: z.ZodString;
992
+ account_id: z.ZodString;
993
+ method: z.ZodString;
994
+ status: z.ZodString;
995
+ linked_at: z.ZodString;
996
+ revoked_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
997
+ revoked_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
998
+ }, z.core.$strip>;
999
+ export type CustomerLink = z.infer<typeof customerLinkSchema>;
1058
1000
  export declare const paymentAuthenticationSchema: z.ZodObject<{
1059
1001
  client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1060
1002
  }, z.core.$strip>;
@@ -1088,15 +1030,4 @@ export type NewCard = NewCardFields & ({
1088
1030
  card: CardEntry;
1089
1031
  token?: never;
1090
1032
  });
1091
- /**
1092
- * A minted checkout session. `id` reads and pays it with no other credential;
1093
- * hand it to this customer's browser only. `url` is the shared payment page
1094
- * (`<CheckoutFrame url>`), null when BuyButton renders the checkout itself.
1095
- */
1096
- export declare const checkoutSessionLinkSchema: z.ZodObject<{
1097
- id: z.ZodString;
1098
- url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1099
- expires_at: z.ZodString;
1100
- }, z.core.$strip>;
1101
- export type CheckoutSessionLink = z.infer<typeof checkoutSessionLinkSchema>;
1102
1033
  export {};