@openrails/billing-ui 0.0.0-stage → 0.233.2

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 (113) hide show
  1. package/CHANGELOG.md +351 -0
  2. package/LICENSE +21 -0
  3. package/README.md +260 -2
  4. package/dist/account/account-billing.d.ts +19 -0
  5. package/dist/account/cancel-dialog.d.ts +18 -0
  6. package/dist/account/change-card-dialog.d.ts +14 -0
  7. package/dist/account/format.d.ts +25 -0
  8. package/dist/account/notice.d.ts +3 -0
  9. package/dist/account/payment-history.d.ts +8 -0
  10. package/dist/account/payment-methods-panel.d.ts +17 -0
  11. package/dist/account/section.d.ts +27 -0
  12. package/dist/account/status-badge.d.ts +8 -0
  13. package/dist/account/subscriptions-panel.d.ts +19 -0
  14. package/dist/appearance.d.ts +23 -0
  15. package/dist/authenticate.d.ts +8 -0
  16. package/dist/checkout-frame.d.ts +17 -0
  17. package/dist/checkout-page.d.ts +21 -0
  18. package/dist/checkout.d.ts +24 -0
  19. package/dist/client/client.d.ts +181 -0
  20. package/dist/client/errors.d.ts +26 -0
  21. package/dist/client/generated/currencies.d.ts +1 -0
  22. package/dist/client/generated/error-codes.d.ts +7 -0
  23. package/dist/client/generated/routes.d.ts +775 -0
  24. package/dist/client/generated/wire.d.ts +682 -0
  25. package/dist/client/index.d.ts +4 -0
  26. package/dist/client/types.d.ts +800 -0
  27. package/dist/client-DXUPzA8C.js +889 -0
  28. package/dist/client-DXUPzA8C.js.map +1 -0
  29. package/dist/client.js +2 -0
  30. package/dist/components/billing-fields.d.ts +39 -0
  31. package/dist/components/card-brands.d.ts +6 -0
  32. package/dist/components/card-fields.d.ts +29 -0
  33. package/dist/components/ccbill-fields.d.ts +8 -0
  34. package/dist/components/methods.d.ts +13 -0
  35. package/dist/components/pay-button.d.ts +6 -0
  36. package/dist/components/qr.d.ts +6 -0
  37. package/dist/components/saved-methods.d.ts +9 -0
  38. package/dist/components/states.d.ts +10 -0
  39. package/dist/components/stripe-card.d.ts +17 -0
  40. package/dist/components/summary.d.ts +12 -0
  41. package/dist/components/ui/alert-dialog.d.ts +18 -0
  42. package/dist/components/ui/badge.d.ts +7 -0
  43. package/dist/components/ui/button.d.ts +8 -0
  44. package/dist/components/ui/card.d.ts +11 -0
  45. package/dist/components/ui/dialog.d.ts +17 -0
  46. package/dist/components/ui/input.d.ts +3 -0
  47. package/dist/components/ui/label.d.ts +3 -0
  48. package/dist/components/ui/radio-group.d.ts +5 -0
  49. package/dist/components/ui/separator.d.ts +3 -0
  50. package/dist/components/ui/skeleton.d.ts +2 -0
  51. package/dist/components/ui/spinner.d.ts +3 -0
  52. package/dist/components/ui/textarea.d.ts +3 -0
  53. package/dist/config-BQELtBh4.js +341 -0
  54. package/dist/config-BQELtBh4.js.map +1 -0
  55. package/dist/dist-CslWupfi.js +3311 -0
  56. package/dist/dist-CslWupfi.js.map +1 -0
  57. package/dist/fixtures.d.ts +9 -0
  58. package/dist/frame.d.ts +47 -0
  59. package/dist/i18n/context.d.ts +4 -0
  60. package/dist/i18n/index.d.ts +2 -0
  61. package/dist/i18n/messages.d.ts +58 -0
  62. package/dist/index.d.ts +29 -0
  63. package/dist/index.js +4090 -0
  64. package/dist/index.js.map +1 -0
  65. package/dist/lib/billing.d.ts +39 -0
  66. package/dist/lib/card-brands.d.ts +2 -0
  67. package/dist/lib/card-entry.d.ts +46 -0
  68. package/dist/lib/ccbill.d.ts +8 -0
  69. package/dist/lib/collect.d.ts +51 -0
  70. package/dist/lib/money.d.ts +10 -0
  71. package/dist/lib/period.d.ts +13 -0
  72. package/dist/lib/rail-meta.d.ts +15 -0
  73. package/dist/lib/redirect.d.ts +2 -0
  74. package/dist/lib/stripe-appearance.d.ts +2 -0
  75. package/dist/lib/stripe.d.ts +2 -0
  76. package/dist/locales/de.d.ts +2 -0
  77. package/dist/locales/de.js +207 -0
  78. package/dist/locales/de.js.map +1 -0
  79. package/dist/locales/en.d.ts +204 -0
  80. package/dist/locales/en.js +207 -0
  81. package/dist/locales/en.js.map +1 -0
  82. package/dist/locales/es.d.ts +2 -0
  83. package/dist/locales/es.js +207 -0
  84. package/dist/locales/es.js.map +1 -0
  85. package/dist/locales/ja.d.ts +2 -0
  86. package/dist/locales/ja.js +198 -0
  87. package/dist/locales/ja.js.map +1 -0
  88. package/dist/locales/ko.d.ts +2 -0
  89. package/dist/locales/ko.js +198 -0
  90. package/dist/locales/ko.js.map +1 -0
  91. package/dist/locales/zh.d.ts +2 -0
  92. package/dist/locales/zh.js +198 -0
  93. package/dist/locales/zh.js.map +1 -0
  94. package/dist/modal.d.ts +12 -0
  95. package/dist/provider.d.ts +18 -0
  96. package/dist/psp.d.ts +35 -0
  97. package/dist/react/config.d.ts +34 -0
  98. package/dist/react/context.d.ts +35 -0
  99. package/dist/react/hooks.d.ts +82 -0
  100. package/dist/react/index.d.ts +4 -0
  101. package/dist/react/provider.d.ts +10 -0
  102. package/dist/react/remote.d.ts +10 -0
  103. package/dist/react.js +33 -0
  104. package/dist/react.js.map +1 -0
  105. package/dist/save-payment-method.d.ts +26 -0
  106. package/dist/scope-context.d.ts +17 -0
  107. package/dist/scope.d.ts +6 -0
  108. package/dist/source.d.ts +5 -0
  109. package/dist/styles.css +3 -0
  110. package/dist/tokenized-card-form.d.ts +24 -0
  111. package/dist/types.d.ts +250 -0
  112. package/docs/payment-form-contract.md +136 -0
  113. package/package.json +112 -3
@@ -0,0 +1,800 @@
1
+ import { z } from 'zod';
2
+ import { CardEntry } from '../lib/card-entry';
3
+ export declare const pageSchema: <T extends z.ZodType>(item: T) => z.ZodObject<{
4
+ data: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<T>>>, z.ZodTransform<z.core.output<T>[], z.core.output<T>[] | null | undefined>>;
5
+ total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
6
+ limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
7
+ offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
8
+ has_more: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
9
+ next_cursor: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
+ }, z.core.$strip>;
11
+ export interface Page<T> {
12
+ data: T[];
13
+ total?: number | null;
14
+ limit?: number | null;
15
+ offset?: number | null;
16
+ has_more?: boolean | null;
17
+ /** The next page's cursor; null on the last page of a cursor list. */
18
+ next_cursor?: string | null;
19
+ }
20
+ /** One page of a cursor list; `next_cursor` is null on the last page. */
21
+ export declare const listPageSchema: <T extends z.ZodType>(item: T) => z.ZodObject<{
22
+ data: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<T>>>, z.ZodTransform<z.core.output<T>[], z.core.output<T>[] | null | undefined>>;
23
+ next_cursor: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string | null, string | null | undefined>>;
24
+ }, z.core.$strip>;
25
+ export interface ListPage<T> {
26
+ data: T[];
27
+ next_cursor: string | null;
28
+ }
29
+ export declare const subscriptionStatusSchema: z.ZodString;
30
+ /** `pending | active | past_due | awaiting_method | unverified | canceled`; kept open for new values. */
31
+ export type SubscriptionStatus = "pending" | "active" | "past_due" | "awaiting_method" | "unverified" | "canceled" | (string & {});
32
+ export declare const pspLinkStateSchema: z.ZodObject<{
33
+ status: z.ZodString;
34
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
35
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
36
+ }, z.core.$strip>;
37
+ /**
38
+ * A catalog price, embedded in a product (`GET /catalog/products`): `unit_amount` of
39
+ * `currency` for `access_duration_hours` of access (null: for good),
40
+ * charging every `billing_interval_hours` (null: one-time).
41
+ */
42
+ export declare const priceSchema: z.ZodObject<{
43
+ id: z.ZodString;
44
+ key: z.ZodString;
45
+ revision: z.ZodOptional<z.ZodNumber>;
46
+ product_id: z.ZodString;
47
+ archived: z.ZodBoolean;
48
+ unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
49
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
50
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
51
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
52
+ }, z.core.$strip>>>;
53
+ currency: z.ZodString;
54
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
55
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
56
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
57
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
58
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
59
+ status: z.ZodString;
60
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
61
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
62
+ }, z.core.$strip>>>>;
63
+ created_at: z.ZodString;
64
+ updated_at: z.ZodString;
65
+ }, z.core.$strip>;
66
+ export type Price = z.infer<typeof priceSchema>;
67
+ export declare const subscriptionProductSchema: z.ZodObject<{
68
+ id: z.ZodString;
69
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
70
+ revision: z.ZodOptional<z.ZodNumber>;
71
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
72
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
73
+ tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
+ tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
75
+ }, z.core.$strip>;
76
+ export type SubscriptionProduct = z.infer<typeof subscriptionProductSchema>;
77
+ export declare const cardSummarySchema: z.ZodObject<{
78
+ brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
79
+ last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
80
+ exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
81
+ exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
82
+ }, z.core.$strip>;
83
+ export type CardSummary = z.infer<typeof cardSummarySchema>;
84
+ export declare const paymentOperationSchema: z.ZodObject<{
85
+ id: z.ZodString;
86
+ status: z.ZodString;
87
+ }, z.core.$strip>;
88
+ export type PaymentOperation = z.infer<typeof paymentOperationSchema>;
89
+ export declare const paymentRecoverySchema: z.ZodObject<{
90
+ last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
91
+ retryable: z.ZodBoolean;
92
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
94
+ id: z.ZodString;
95
+ status: z.ZodString;
96
+ }, z.core.$strip>>>;
97
+ }, z.core.$strip>;
98
+ export type PaymentRecovery = z.infer<typeof paymentRecoverySchema>;
99
+ /**
100
+ * A step the customer takes before an action completes. With
101
+ * `solana_sign_transactions` the wallet signs and sends `transactions` in
102
+ * order; the action is then repeated with the last signature.
103
+ */
104
+ export declare const nextActionSchema: z.ZodObject<{
105
+ type: z.ZodString;
106
+ redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
107
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
108
+ }, z.core.$strip>>>;
109
+ transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
110
+ }, z.core.$strip>;
111
+ export type NextAction = z.infer<typeof nextActionSchema>;
112
+ export declare const subscriptionSchema: z.ZodObject<{
113
+ id: z.ZodString;
114
+ status: z.ZodString;
115
+ rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
116
+ product_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
+ price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
+ psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
119
+ payment_method_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
+ started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
121
+ ended_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
+ current_period_starts_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
+ current_period_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
124
+ canceled_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
+ cancel_type: z.ZodOptional<z.ZodNullable<z.ZodString>>;
126
+ resumable: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
127
+ cancel_scheduled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
128
+ cancel_mode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
129
+ cancel_portal_url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
130
+ access: z.ZodOptional<z.ZodNullable<z.ZodObject<{
131
+ starts_at: z.ZodString;
132
+ ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
133
+ }, z.core.$strip>>>;
134
+ grace_ends_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
135
+ next_retry_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
136
+ price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
137
+ id: z.ZodString;
138
+ key: z.ZodString;
139
+ revision: z.ZodOptional<z.ZodNumber>;
140
+ product_id: z.ZodString;
141
+ archived: z.ZodBoolean;
142
+ unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
143
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
144
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
145
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
146
+ }, z.core.$strip>>>;
147
+ currency: z.ZodString;
148
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
149
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
150
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
151
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
152
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
153
+ status: z.ZodString;
154
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
155
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
156
+ }, z.core.$strip>>>>;
157
+ created_at: z.ZodString;
158
+ updated_at: z.ZodString;
159
+ }, z.core.$strip>>>;
160
+ product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
161
+ id: z.ZodString;
162
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
+ revision: z.ZodOptional<z.ZodNumber>;
164
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
165
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
166
+ tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
167
+ tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
168
+ }, z.core.$strip>>>;
169
+ scheduled_price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
170
+ id: z.ZodString;
171
+ key: z.ZodString;
172
+ revision: z.ZodOptional<z.ZodNumber>;
173
+ product_id: z.ZodString;
174
+ archived: z.ZodBoolean;
175
+ unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
176
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
177
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
178
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
179
+ }, z.core.$strip>>>;
180
+ currency: z.ZodString;
181
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
182
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
183
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
184
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
185
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
186
+ status: z.ZodString;
187
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
188
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
+ }, z.core.$strip>>>>;
190
+ created_at: z.ZodString;
191
+ updated_at: z.ZodString;
192
+ }, z.core.$strip>>>;
193
+ scheduled_product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
194
+ id: z.ZodString;
195
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
196
+ revision: z.ZodOptional<z.ZodNumber>;
197
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
198
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
199
+ tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
200
+ tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
201
+ }, z.core.$strip>>>;
202
+ card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
203
+ brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
204
+ last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
205
+ exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
206
+ exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
207
+ }, z.core.$strip>>>;
208
+ recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
209
+ last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
210
+ retryable: z.ZodBoolean;
211
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
212
+ operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
213
+ id: z.ZodString;
214
+ status: z.ZodString;
215
+ }, z.core.$strip>>>;
216
+ }, z.core.$strip>>>;
217
+ next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
218
+ type: z.ZodString;
219
+ redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
220
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
221
+ }, z.core.$strip>>>;
222
+ transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
223
+ }, z.core.$strip>>>;
224
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
225
+ updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
226
+ }, z.core.$strip>;
227
+ export type Subscription = z.infer<typeof subscriptionSchema> & {
228
+ status: SubscriptionStatus;
229
+ };
230
+ export declare const billingDetailsSchema: z.ZodObject<{
231
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
232
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
233
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
234
+ address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
235
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
236
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
237
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
238
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
239
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
240
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
241
+ }, z.core.$strip>>>;
242
+ }, z.core.$strip>;
243
+ export type BillingDetails = z.infer<typeof billingDetailsSchema>;
244
+ export declare const paymentMethodSchema: z.ZodObject<{
245
+ id: z.ZodString;
246
+ rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
247
+ psp_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
248
+ card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
249
+ brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
250
+ last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
251
+ exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
252
+ exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
253
+ }, z.core.$strip>>>;
254
+ billing_details: z.ZodOptional<z.ZodNullable<z.ZodObject<{
255
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
256
+ email: z.ZodOptional<z.ZodNullable<z.ZodString>>;
257
+ phone: z.ZodOptional<z.ZodNullable<z.ZodString>>;
258
+ address: z.ZodOptional<z.ZodNullable<z.ZodObject<{
259
+ line1: z.ZodOptional<z.ZodNullable<z.ZodString>>;
260
+ line2: z.ZodOptional<z.ZodNullable<z.ZodString>>;
261
+ city: z.ZodOptional<z.ZodNullable<z.ZodString>>;
262
+ state: z.ZodOptional<z.ZodNullable<z.ZodString>>;
263
+ postal_code: z.ZodOptional<z.ZodNullable<z.ZodString>>;
264
+ country: z.ZodOptional<z.ZodNullable<z.ZodString>>;
265
+ }, z.core.$strip>>>;
266
+ }, z.core.$strip>>>;
267
+ health: z.ZodOptional<z.ZodNullable<z.ZodObject<{
268
+ expiry_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
269
+ last_charged_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
270
+ last_charge_outcome: z.ZodOptional<z.ZodNullable<z.ZodString>>;
271
+ active: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
272
+ }, z.core.$strip>>>;
273
+ subscriptions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
274
+ id: z.ZodString;
275
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
276
+ }, z.core.$strip>>>>;
277
+ collection_currencies: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
278
+ created_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
279
+ }, z.core.$strip>;
280
+ export type PaymentMethod = z.infer<typeof paymentMethodSchema>;
281
+ /** A price's state on one PSP; public routes carry the status only. */
282
+ export declare const productSchema: z.ZodObject<{
283
+ id: z.ZodString;
284
+ key: z.ZodString;
285
+ revision: z.ZodOptional<z.ZodNumber>;
286
+ display_name: z.ZodString;
287
+ description: z.ZodString;
288
+ entitlements: z.ZodArray<z.ZodString>;
289
+ credit_grant: z.ZodOptional<z.ZodNullable<z.ZodObject<{
290
+ currency: z.ZodString;
291
+ amount: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
292
+ from_payment: z.ZodOptional<z.ZodBoolean>;
293
+ expires_after_days: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
294
+ }, z.core.$strip>>>;
295
+ tier_group: z.ZodNullable<z.ZodString>;
296
+ tier_rank: z.ZodNumber;
297
+ archived: z.ZodBoolean;
298
+ prices: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
299
+ id: z.ZodString;
300
+ key: z.ZodString;
301
+ revision: z.ZodOptional<z.ZodNumber>;
302
+ product_id: z.ZodString;
303
+ archived: z.ZodBoolean;
304
+ unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
305
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
306
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
307
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
308
+ }, z.core.$strip>>>;
309
+ currency: z.ZodString;
310
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
311
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
312
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
313
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
314
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
315
+ status: z.ZodString;
316
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
317
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
318
+ }, z.core.$strip>>>>;
319
+ created_at: z.ZodString;
320
+ updated_at: z.ZodString;
321
+ }, z.core.$strip>>>>, z.ZodTransform<{
322
+ id: string;
323
+ key: string;
324
+ product_id: string;
325
+ archived: boolean;
326
+ unit_amount: string;
327
+ currency: string;
328
+ access_duration_hours: number | null;
329
+ billing_interval_hours: number | null;
330
+ trial_unit_amount: string | null;
331
+ trial_duration_hours: number | null;
332
+ created_at: string;
333
+ updated_at: string;
334
+ revision?: number | undefined;
335
+ customer_amount?: {
336
+ min_amount: string;
337
+ max_amount: string;
338
+ } | null | undefined;
339
+ psps?: Record<string, {
340
+ status: string;
341
+ ids?: Record<string, string> | null | undefined;
342
+ sync_status?: string | null | undefined;
343
+ }> | null | undefined;
344
+ }[], {
345
+ id: string;
346
+ key: string;
347
+ product_id: string;
348
+ archived: boolean;
349
+ unit_amount: string;
350
+ currency: string;
351
+ access_duration_hours: number | null;
352
+ billing_interval_hours: number | null;
353
+ trial_unit_amount: string | null;
354
+ trial_duration_hours: number | null;
355
+ created_at: string;
356
+ updated_at: string;
357
+ revision?: number | undefined;
358
+ customer_amount?: {
359
+ min_amount: string;
360
+ max_amount: string;
361
+ } | null | undefined;
362
+ psps?: Record<string, {
363
+ status: string;
364
+ ids?: Record<string, string> | null | undefined;
365
+ sync_status?: string | null | undefined;
366
+ }> | null | undefined;
367
+ }[] | null | undefined>>;
368
+ created_at: z.ZodString;
369
+ updated_at: z.ZodString;
370
+ }, z.core.$strip>;
371
+ export type Product = z.infer<typeof productSchema>;
372
+ export declare const paymentSchema: z.ZodObject<{
373
+ id: z.ZodString;
374
+ kind: z.ZodString;
375
+ status: z.ZodString;
376
+ amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
377
+ amount_refunded: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
378
+ currency: z.ZodString;
379
+ subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
380
+ price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
381
+ channel: z.ZodOptional<z.ZodNullable<z.ZodString>>;
382
+ rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
383
+ created_at: z.ZodString;
384
+ price: z.ZodOptional<z.ZodNullable<z.ZodObject<{
385
+ id: z.ZodString;
386
+ key: z.ZodString;
387
+ revision: z.ZodOptional<z.ZodNumber>;
388
+ product_id: z.ZodString;
389
+ archived: z.ZodBoolean;
390
+ unit_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
391
+ customer_amount: z.ZodOptional<z.ZodNullable<z.ZodObject<{
392
+ min_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
393
+ max_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
394
+ }, z.core.$strip>>>;
395
+ currency: z.ZodString;
396
+ access_duration_hours: z.ZodNullable<z.ZodNumber>;
397
+ billing_interval_hours: z.ZodNullable<z.ZodNumber>;
398
+ trial_unit_amount: z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>;
399
+ trial_duration_hours: z.ZodNullable<z.ZodNumber>;
400
+ psps: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodObject<{
401
+ status: z.ZodString;
402
+ ids: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
403
+ sync_status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
404
+ }, z.core.$strip>>>>;
405
+ created_at: z.ZodString;
406
+ updated_at: z.ZodString;
407
+ }, z.core.$strip>>>;
408
+ product: z.ZodOptional<z.ZodNullable<z.ZodObject<{
409
+ id: z.ZodString;
410
+ key: z.ZodOptional<z.ZodNullable<z.ZodString>>;
411
+ revision: z.ZodOptional<z.ZodNumber>;
412
+ display_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
413
+ description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
414
+ tier_group: z.ZodOptional<z.ZodNullable<z.ZodString>>;
415
+ tier_rank: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
416
+ }, z.core.$strip>>>;
417
+ card: z.ZodOptional<z.ZodNullable<z.ZodObject<{
418
+ brand: z.ZodOptional<z.ZodNullable<z.ZodString>>;
419
+ last4: z.ZodOptional<z.ZodNullable<z.ZodString>>;
420
+ exp_month: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
421
+ exp_year: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
422
+ }, z.core.$strip>>>;
423
+ failure: z.ZodOptional<z.ZodNullable<z.ZodObject<{
424
+ reason: z.ZodString;
425
+ message: z.ZodString;
426
+ field: z.ZodOptional<z.ZodNullable<z.ZodString>>;
427
+ }, z.core.$strip>>>;
428
+ }, z.core.$strip>;
429
+ export type Payment = z.infer<typeof paymentSchema>;
430
+ export declare const invoiceSchema: z.ZodObject<{
431
+ id: z.ZodString;
432
+ currency: z.ZodString;
433
+ invoice_number: z.ZodOptional<z.ZodNullable<z.ZodString>>;
434
+ period_starts_at: z.ZodString;
435
+ period_ends_at: z.ZodString;
436
+ total_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
437
+ amount_paid: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
438
+ amount_due: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
439
+ status: z.ZodString;
440
+ issued_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
441
+ due_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
442
+ paid_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
443
+ recovery: z.ZodOptional<z.ZodNullable<z.ZodObject<{
444
+ last_failure_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
445
+ retryable: z.ZodBoolean;
446
+ blocked_reason: z.ZodOptional<z.ZodNullable<z.ZodString>>;
447
+ operation: z.ZodOptional<z.ZodNullable<z.ZodObject<{
448
+ id: z.ZodString;
449
+ status: z.ZodString;
450
+ }, z.core.$strip>>>;
451
+ }, z.core.$strip>>>;
452
+ created_at: z.ZodString;
453
+ }, z.core.$strip>;
454
+ export type Invoice = z.infer<typeof invoiceSchema>;
455
+ /** Currency code (upper case) to its native-unit scale. */
456
+ export type CurrencyScales = Readonly<Record<string, number>>;
457
+ export declare const currencySchema: z.ZodObject<{
458
+ code: z.ZodString;
459
+ decimals: z.ZodNumber;
460
+ minor_decimals: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
461
+ }, z.core.$strip>;
462
+ export type Currency = z.infer<typeof currencySchema>;
463
+ export declare const tierChangePreviewSchema: z.ZodObject<{
464
+ action: z.ZodString;
465
+ price_id: z.ZodString;
466
+ rail: z.ZodOptional<z.ZodNullable<z.ZodString>>;
467
+ currency: z.ZodString;
468
+ amount_due_now: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
469
+ next_charge_amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
470
+ next_charge_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
471
+ effective: z.ZodString;
472
+ is_estimate: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
473
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
474
+ }, z.core.$strip>;
475
+ export type TierChangePreview = z.infer<typeof tierChangePreviewSchema>;
476
+ export declare const tierChangeSchema: z.ZodObject<{
477
+ status: z.ZodString;
478
+ action: z.ZodOptional<z.ZodNullable<z.ZodString>>;
479
+ effective: z.ZodOptional<z.ZodNullable<z.ZodString>>;
480
+ price_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
481
+ subscription_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
482
+ next_action: z.ZodOptional<z.ZodNullable<z.ZodObject<{
483
+ type: z.ZodString;
484
+ redirect_to_url: z.ZodOptional<z.ZodNullable<z.ZodObject<{
485
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
486
+ }, z.core.$strip>>>;
487
+ transactions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodString>>>;
488
+ }, z.core.$strip>>>;
489
+ delayed_start: z.ZodOptional<z.ZodNullable<z.ZodString>>;
490
+ currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
491
+ amount_due_now: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
492
+ next_charge_amount: z.ZodOptional<z.ZodNullable<z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>>>;
493
+ next_charge_date: z.ZodOptional<z.ZodNullable<z.ZodString>>;
494
+ message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
495
+ operation_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
496
+ }, z.core.$strip>;
497
+ export type TierChange = z.infer<typeof tierChangeSchema>;
498
+ export declare const solanaTokenSchema: z.ZodObject<{
499
+ symbol: z.ZodString;
500
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
501
+ mint: z.ZodString;
502
+ decimals: z.ZodNumber;
503
+ price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
504
+ preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
505
+ recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
506
+ quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
507
+ amount: z.ZodString;
508
+ units: z.ZodString;
509
+ token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
510
+ fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
511
+ fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
512
+ quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
513
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
514
+ }, z.core.$strip>>>;
515
+ balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
516
+ amount: z.ZodString;
517
+ units: z.ZodString;
518
+ sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
519
+ }, z.core.$strip>>>;
520
+ }, z.core.$strip>;
521
+ export type SolanaToken = z.infer<typeof solanaTokenSchema>;
522
+ export declare const solanaTokensSchema: z.ZodObject<{
523
+ tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
524
+ symbol: z.ZodString;
525
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
526
+ mint: z.ZodString;
527
+ decimals: z.ZodNumber;
528
+ price: z.ZodOptional<z.ZodNullable<z.ZodString>>;
529
+ preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
530
+ recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
531
+ quote: z.ZodOptional<z.ZodNullable<z.ZodObject<{
532
+ amount: z.ZodString;
533
+ units: z.ZodString;
534
+ token_price_usd: z.ZodOptional<z.ZodNullable<z.ZodString>>;
535
+ fx_rate: z.ZodOptional<z.ZodNullable<z.ZodString>>;
536
+ fx_currency: z.ZodOptional<z.ZodNullable<z.ZodString>>;
537
+ quoted_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
538
+ expires_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
539
+ }, z.core.$strip>>>;
540
+ balance: z.ZodOptional<z.ZodNullable<z.ZodObject<{
541
+ amount: z.ZodString;
542
+ units: z.ZodString;
543
+ sufficient: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
544
+ }, z.core.$strip>>>;
545
+ }, z.core.$strip>>>>, z.ZodTransform<{
546
+ symbol: string;
547
+ mint: string;
548
+ decimals: number;
549
+ name?: string | null | undefined;
550
+ price?: string | null | undefined;
551
+ preferred?: boolean | null | undefined;
552
+ recurring_eligible?: boolean | null | undefined;
553
+ quote?: {
554
+ amount: string;
555
+ units: string;
556
+ token_price_usd?: string | null | undefined;
557
+ fx_rate?: string | null | undefined;
558
+ fx_currency?: string | null | undefined;
559
+ quoted_at?: string | null | undefined;
560
+ expires_at?: string | null | undefined;
561
+ } | null | undefined;
562
+ balance?: {
563
+ amount: string;
564
+ units: string;
565
+ sufficient?: boolean | null | undefined;
566
+ } | null | undefined;
567
+ }[], {
568
+ symbol: string;
569
+ mint: string;
570
+ decimals: number;
571
+ name?: string | null | undefined;
572
+ price?: string | null | undefined;
573
+ preferred?: boolean | null | undefined;
574
+ recurring_eligible?: boolean | null | undefined;
575
+ quote?: {
576
+ amount: string;
577
+ units: string;
578
+ token_price_usd?: string | null | undefined;
579
+ fx_rate?: string | null | undefined;
580
+ fx_currency?: string | null | undefined;
581
+ quoted_at?: string | null | undefined;
582
+ expires_at?: string | null | undefined;
583
+ } | null | undefined;
584
+ balance?: {
585
+ amount: string;
586
+ units: string;
587
+ sufficient?: boolean | null | undefined;
588
+ } | null | undefined;
589
+ }[] | null | undefined>>;
590
+ }, z.core.$strip>;
591
+ /**
592
+ * The merchant's browser payment setup: its armed PSPs with their public
593
+ * values and, with a Solana PSP, the network and accepted tokens a wallet
594
+ * adapter is configured with.
595
+ */
596
+ export declare const paymentConfigSchema: z.ZodObject<{
597
+ psps: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
598
+ psp_id: z.ZodString;
599
+ key: z.ZodString;
600
+ rail: z.ZodString;
601
+ custodian: z.ZodString;
602
+ display_name: z.ZodString;
603
+ flow: z.ZodString;
604
+ config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
605
+ checkout: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
606
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
607
+ retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
608
+ }, z.core.$strip>>>>, z.ZodTransform<{
609
+ psp_id: string;
610
+ key: string;
611
+ rail: string;
612
+ custodian: string;
613
+ display_name: string;
614
+ flow: string;
615
+ config?: Record<string, string> | null | undefined;
616
+ checkout?: boolean | null | undefined;
617
+ status?: string | null | undefined;
618
+ retry_after?: number | null | undefined;
619
+ }[], {
620
+ psp_id: string;
621
+ key: string;
622
+ rail: string;
623
+ custodian: string;
624
+ display_name: string;
625
+ flow: string;
626
+ config?: Record<string, string> | null | undefined;
627
+ checkout?: boolean | null | undefined;
628
+ status?: string | null | undefined;
629
+ retry_after?: number | null | undefined;
630
+ }[] | null | undefined>>;
631
+ solana: z.ZodOptional<z.ZodNullable<z.ZodObject<{
632
+ network: z.ZodString;
633
+ chain: z.ZodString;
634
+ preferred_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
635
+ tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
636
+ symbol: z.ZodString;
637
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
638
+ mint: z.ZodString;
639
+ decimals: z.ZodNumber;
640
+ preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
641
+ recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
642
+ }, z.core.$strip>>>>, z.ZodTransform<{
643
+ symbol: string;
644
+ mint: string;
645
+ decimals: number;
646
+ name?: string | null | undefined;
647
+ preferred?: boolean | null | undefined;
648
+ recurring_eligible?: boolean | null | undefined;
649
+ }[], {
650
+ symbol: string;
651
+ mint: string;
652
+ decimals: number;
653
+ name?: string | null | undefined;
654
+ preferred?: boolean | null | undefined;
655
+ recurring_eligible?: boolean | null | undefined;
656
+ }[] | null | undefined>>;
657
+ }, z.core.$strip>>>;
658
+ }, z.core.$strip>;
659
+ export type PaymentConfig = z.infer<typeof paymentConfigSchema>;
660
+ /**
661
+ * What a browser needs to know about the deployment and its merchant
662
+ * (`GET /config`): the mount's capabilities, the currency registry and the
663
+ * merchant's payment setup (null when the request resolves no merchant).
664
+ */
665
+ export declare const publicConfigSchema: z.ZodObject<{
666
+ capabilities: z.ZodObject<{
667
+ route_groups: z.ZodRecord<z.ZodString, z.ZodBoolean>;
668
+ features: z.ZodRecord<z.ZodString, z.ZodBoolean>;
669
+ }, z.core.$strip>;
670
+ currencies: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
671
+ code: z.ZodString;
672
+ decimals: z.ZodNumber;
673
+ minor_decimals: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
674
+ }, z.core.$strip>>>>, z.ZodTransform<{
675
+ code: string;
676
+ decimals: number;
677
+ minor_decimals?: number | null | undefined;
678
+ }[], {
679
+ code: string;
680
+ decimals: number;
681
+ minor_decimals?: number | null | undefined;
682
+ }[] | null | undefined>>;
683
+ payment: z.ZodOptional<z.ZodNullable<z.ZodObject<{
684
+ psps: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
685
+ psp_id: z.ZodString;
686
+ key: z.ZodString;
687
+ rail: z.ZodString;
688
+ custodian: z.ZodString;
689
+ display_name: z.ZodString;
690
+ flow: z.ZodString;
691
+ config: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
692
+ checkout: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
693
+ status: z.ZodOptional<z.ZodNullable<z.ZodString>>;
694
+ retry_after: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
695
+ }, z.core.$strip>>>>, z.ZodTransform<{
696
+ psp_id: string;
697
+ key: string;
698
+ rail: string;
699
+ custodian: string;
700
+ display_name: string;
701
+ flow: string;
702
+ config?: Record<string, string> | null | undefined;
703
+ checkout?: boolean | null | undefined;
704
+ status?: string | null | undefined;
705
+ retry_after?: number | null | undefined;
706
+ }[], {
707
+ psp_id: string;
708
+ key: string;
709
+ rail: string;
710
+ custodian: string;
711
+ display_name: string;
712
+ flow: string;
713
+ config?: Record<string, string> | null | undefined;
714
+ checkout?: boolean | null | undefined;
715
+ status?: string | null | undefined;
716
+ retry_after?: number | null | undefined;
717
+ }[] | null | undefined>>;
718
+ solana: z.ZodOptional<z.ZodNullable<z.ZodObject<{
719
+ network: z.ZodString;
720
+ chain: z.ZodString;
721
+ preferred_token: z.ZodOptional<z.ZodNullable<z.ZodString>>;
722
+ tokens: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
723
+ symbol: z.ZodString;
724
+ name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
725
+ mint: z.ZodString;
726
+ decimals: z.ZodNumber;
727
+ preferred: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
728
+ recurring_eligible: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
729
+ }, z.core.$strip>>>>, z.ZodTransform<{
730
+ symbol: string;
731
+ mint: string;
732
+ decimals: number;
733
+ name?: string | null | undefined;
734
+ preferred?: boolean | null | undefined;
735
+ recurring_eligible?: boolean | null | undefined;
736
+ }[], {
737
+ symbol: string;
738
+ mint: string;
739
+ decimals: number;
740
+ name?: string | null | undefined;
741
+ preferred?: boolean | null | undefined;
742
+ recurring_eligible?: boolean | null | undefined;
743
+ }[] | null | undefined>>;
744
+ }, z.core.$strip>>>;
745
+ }, z.core.$strip>>>;
746
+ }, z.core.$strip>;
747
+ export type PublicConfig = z.infer<typeof publicConfigSchema>;
748
+ /** An in-page card setup; `payment_method_id` is set once the card is saved. */
749
+ export declare const cardSetupSchema: z.ZodObject<{
750
+ id: z.ZodString;
751
+ status: z.ZodString;
752
+ client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
753
+ payment_method_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
754
+ }, z.core.$strip>;
755
+ export type CardSetup = z.infer<typeof cardSetupSchema>;
756
+ export declare const paymentAuthenticationSchema: z.ZodObject<{
757
+ client_secret: z.ZodOptional<z.ZodNullable<z.ZodString>>;
758
+ }, z.core.$strip>;
759
+ export type PaymentAuthentication = z.infer<typeof paymentAuthenticationSchema>;
760
+ /**
761
+ * What a card setup hands the server: tokenized data only, never a PAN.
762
+ * OpenRails reads the saved card's brand, last four and expiry from the PSP.
763
+ */
764
+ interface NewCardFields {
765
+ /** The PSP the card is saved with (`psp_id` of a rail option); required. */
766
+ psp_id: string;
767
+ billing_details?: {
768
+ name?: string;
769
+ email?: string;
770
+ address?: {
771
+ postal_code?: string;
772
+ country?: string;
773
+ };
774
+ };
775
+ }
776
+ /**
777
+ * A card to save: a token from the PSP's own fields (`payment_token`), or,
778
+ * for a PSP whose card_entry is server (`cardSetupDriver` "card"), the card
779
+ * itself, posted to OpenRails and never kept by this package.
780
+ */
781
+ export type NewCard = NewCardFields & ({
782
+ payment_token: string;
783
+ card?: never;
784
+ } | {
785
+ card: CardEntry;
786
+ payment_token?: never;
787
+ });
788
+ /**
789
+ * A minted checkout session. `id` reads and pays it with no other credential
790
+ * (`client.checkoutSource(id)`); hand it to this customer's browser only.
791
+ * `url` is the shared payment page (`<CheckoutFrame url>`), null when the app
792
+ * renders `<Checkout>` itself.
793
+ */
794
+ export declare const checkoutSessionLinkSchema: z.ZodObject<{
795
+ id: z.ZodString;
796
+ url: z.ZodOptional<z.ZodNullable<z.ZodString>>;
797
+ expires_at: z.ZodString;
798
+ }, z.core.$strip>;
799
+ export type CheckoutSessionLink = z.infer<typeof checkoutSessionLinkSchema>;
800
+ export {};