@peable.to/contracts 2.0.0 → 3.1.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/dist/cjs/resources/catalog/index.js +1 -5
  2. package/dist/cjs/resources/checkout/checkoutSessions.js +0 -4
  3. package/dist/cjs/resources/events/events.js +1 -32
  4. package/dist/cjs/resources/events/webhookDeliveries.js +1 -1
  5. package/dist/cjs/resources/events/webhookEndpoints.js +1 -1
  6. package/dist/cjs/resources/payments/disputes.js +16 -0
  7. package/dist/cjs/resources/payments/refunds.js +46 -11
  8. package/dist/cjs/vocabulary/catalog.js +1 -17
  9. package/dist/cjs/vocabulary/errors.js +0 -13
  10. package/dist/cjs/vocabulary/events.js +5 -1
  11. package/dist/esm/resources/catalog/index.js +1 -5
  12. package/dist/esm/resources/checkout/checkoutSessions.js +0 -4
  13. package/dist/esm/resources/events/events.js +0 -31
  14. package/dist/esm/resources/events/webhookDeliveries.js +1 -1
  15. package/dist/esm/resources/events/webhookEndpoints.js +1 -1
  16. package/dist/esm/resources/payments/disputes.js +16 -0
  17. package/dist/esm/resources/payments/refunds.js +46 -11
  18. package/dist/esm/vocabulary/catalog.js +0 -16
  19. package/dist/esm/vocabulary/errors.js +0 -13
  20. package/dist/esm/vocabulary/events.js +5 -1
  21. package/dist/types/resources/catalog/index.d.ts +1 -851
  22. package/dist/types/resources/checkout/checkoutSessions.d.ts +13 -61
  23. package/dist/types/resources/checkout/index.d.ts +10 -46
  24. package/dist/types/resources/connect/balance.d.ts +5 -5
  25. package/dist/types/resources/connect/index.d.ts +4 -4
  26. package/dist/types/resources/connect/payouts.d.ts +2 -2
  27. package/dist/types/resources/events/events.d.ts +0 -22
  28. package/dist/types/resources/events/index.d.ts +7 -15
  29. package/dist/types/resources/events/webhookDeliveries.d.ts +0 -3
  30. package/dist/types/resources/events/webhookEndpoints.d.ts +11 -16
  31. package/dist/types/resources/payments/disputes.d.ts +35 -0
  32. package/dist/types/resources/payments/index.d.ts +82 -10
  33. package/dist/types/resources/payments/paymentIntents.d.ts +10 -10
  34. package/dist/types/resources/payments/refunds.d.ts +56 -5
  35. package/dist/types/resources/payments/testHelpers.d.ts +1 -1
  36. package/dist/types/resources/tax/index.d.ts +1 -1
  37. package/dist/types/resources/tax/registrations.d.ts +2 -2
  38. package/dist/types/vocabulary/catalog.d.ts +0 -9
  39. package/dist/types/vocabulary/errors.d.ts +0 -13
  40. package/dist/types/vocabulary/events.d.ts +5 -2
  41. package/package.json +1 -1
  42. package/dist/cjs/resources/catalog/billing.js +0 -753
  43. package/dist/esm/resources/catalog/billing.js +0 -750
  44. package/dist/types/resources/catalog/billing.d.ts +0 -1723
@@ -1,1723 +0,0 @@
1
- import { z } from 'zod';
2
- /**
3
- * The recurring billing transport (`/v1/billing/*`): an Oxy app's own
4
- * subscription checkout — Oxy One, Mention Plus — over a configured settlement
5
- * rail (a fiat provider such as Stripe, or FairCoin). Store and plan references
6
- * belong to the authenticated app; they do not identify an Oxy payer or convey
7
- * entitlements. Payment success and access require the authoritative backend
8
- * outcome read here — never a closed sheet or a browser callback.
9
- *
10
- * Every write takes an `Idempotency-Key` header, which the route REQUIRES
11
- * (a missing or malformed key is a 400): the key is the operation's identity
12
- * at the provider, not a replay convenience.
13
- */
14
- /** An opaque app or provider reference: 1–128 of `A–Z a–z 0–9 _ . : -`. */
15
- export declare const billingReference: z.ZodString;
16
- /** The `Idempotency-Key` of a billing write: 1–200 of `A–Z a–z 0–9 _ . : -`. */
17
- export declare const billingIdempotencyKey: z.ZodString;
18
- /**
19
- * A configured settlement rail's name (`stripe`, `faircoin`, a further fiat
20
- * provider). Selecting one never configures it: an unconfigured rail is
21
- * refused.
22
- */
23
- export declare const billingRailId: z.ZodString;
24
- /** HTTPS destinations only; the authenticated app supplies its own return page. */
25
- export declare const billingReturnUrl: z.ZodString;
26
- /** An instant in signed billing evidence: integer Unix seconds that stay a safe integer. */
27
- export declare const billingInstant: z.ZodNumber;
28
- /** A billing customer reference (`cus_…`). */
29
- export declare const billingCustomerRef: z.ZodString;
30
- /** A billing price reference (`price_…`). */
31
- export declare const billingPriceRef: z.ZodString;
32
- /**
33
- * One offer a rail can sell. Fiat provider rails bind their prices from the
34
- * app's own provider catalogue, so they list `offers: null`.
35
- */
36
- export declare const billingRailOfferSchema: z.ZodObject<{
37
- provider_price_id: z.ZodString;
38
- plan_id: z.ZodString;
39
- interval: z.ZodEnum<{
40
- month: "month";
41
- year: "year";
42
- }>;
43
- currency: z.ZodString;
44
- gross_minor_units: z.ZodString;
45
- tax_treatment: z.ZodEnum<{
46
- inclusive: "inclusive";
47
- exclusive: "exclusive";
48
- }>;
49
- }, z.core.$strict>;
50
- export type BillingRailOffer = z.output<typeof billingRailOfferSchema>;
51
- /**
52
- * A settlement rail a merchant's recurring offers can be paid through. One
53
- * merchant may offer several at once and the payer chooses; every rail answers
54
- * through the same subscription, invoice and authority contracts.
55
- */
56
- export type BillingRail = 'stripe' | 'faircoin' | (string & {});
57
- export declare const billingRailOptionSchema: z.ZodObject<{
58
- rail: z.ZodString;
59
- settlement: z.ZodEnum<{
60
- faircoin: "faircoin";
61
- fiat: "fiat";
62
- }>;
63
- default: z.ZodBoolean;
64
- tax_quotes: z.ZodBoolean;
65
- renewal: z.ZodEnum<{
66
- automatic: "automatic";
67
- payer_initiated: "payer_initiated";
68
- }>;
69
- offers: z.ZodNullable<z.ZodArray<z.ZodObject<{
70
- provider_price_id: z.ZodString;
71
- plan_id: z.ZodString;
72
- interval: z.ZodEnum<{
73
- month: "month";
74
- year: "year";
75
- }>;
76
- currency: z.ZodString;
77
- gross_minor_units: z.ZodString;
78
- tax_treatment: z.ZodEnum<{
79
- inclusive: "inclusive";
80
- exclusive: "exclusive";
81
- }>;
82
- }, z.core.$strict>>>;
83
- }, z.core.$strict>;
84
- export type BillingRailOption = z.output<typeof billingRailOptionSchema>;
85
- /** Every rail this merchant's payers can choose between, default first. A complete set. */
86
- export declare const billingRailListSchema: z.ZodObject<{
87
- object: z.ZodLiteral<"list">;
88
- data: z.ZodArray<z.ZodObject<{
89
- rail: z.ZodString;
90
- settlement: z.ZodEnum<{
91
- faircoin: "faircoin";
92
- fiat: "fiat";
93
- }>;
94
- default: z.ZodBoolean;
95
- tax_quotes: z.ZodBoolean;
96
- renewal: z.ZodEnum<{
97
- automatic: "automatic";
98
- payer_initiated: "payer_initiated";
99
- }>;
100
- offers: z.ZodNullable<z.ZodArray<z.ZodObject<{
101
- provider_price_id: z.ZodString;
102
- plan_id: z.ZodString;
103
- interval: z.ZodEnum<{
104
- month: "month";
105
- year: "year";
106
- }>;
107
- currency: z.ZodString;
108
- gross_minor_units: z.ZodString;
109
- tax_treatment: z.ZodEnum<{
110
- inclusive: "inclusive";
111
- exclusive: "exclusive";
112
- }>;
113
- }, z.core.$strict>>>;
114
- }, z.core.$strict>>;
115
- }, z.core.$strict>;
116
- export type BillingRailList = z.output<typeof billingRailListSchema>;
117
- export declare const ensureBillingCustomerParams: z.ZodObject<{
118
- store_id: z.ZodString;
119
- store_name: z.ZodString;
120
- rail: z.ZodOptional<z.ZodString>;
121
- }, z.core.$strict>;
122
- export type EnsureBillingCustomerParams = z.input<typeof ensureBillingCustomerParams>;
123
- export declare const billingCustomerSchema: z.ZodObject<{
124
- provider_customer_id: z.ZodString;
125
- }, z.core.$strict>;
126
- export type BillingCustomer = z.output<typeof billingCustomerSchema>;
127
- /**
128
- * A merchant asks Peable to quote a registered product. Monetary and fiscal
129
- * configuration is resolved inside Peable, never supplied by a consumer.
130
- */
131
- export declare const createBillingTaxQuoteParams: z.ZodObject<{
132
- rail: z.ZodOptional<z.ZodString>;
133
- store_id: z.ZodString;
134
- plan_id: z.ZodString;
135
- provider_price_id: z.ZodOptional<z.ZodString>;
136
- customer_location_evidence_id: z.ZodString;
137
- }, z.core.$strict>;
138
- export type CreateBillingTaxQuoteParams = z.input<typeof createBillingTaxQuoteParams>;
139
- /** A signed, immutable, single-use Peable Tax quote (schema version 3). */
140
- export declare const billingTaxQuoteSchema: z.ZodObject<{
141
- schema_version: z.ZodLiteral<3>;
142
- source: z.ZodObject<{
143
- merchant_id: z.ZodString;
144
- app_id: z.ZodString;
145
- store_id: z.ZodString;
146
- plan_id: z.ZodString;
147
- mode: z.ZodEnum<{
148
- test: "test";
149
- live: "live";
150
- }>;
151
- environment: z.ZodEnum<{
152
- development: "development";
153
- staging: "staging";
154
- production: "production";
155
- }>;
156
- }, z.core.$strict>;
157
- quote: z.ZodObject<{
158
- id: z.ZodString;
159
- currency: z.ZodString;
160
- gross_minor_units: z.ZodString;
161
- net_minor_units: z.ZodString;
162
- tax_minor_units: z.ZodString;
163
- tax_treatment: z.ZodEnum<{
164
- inclusive: "inclusive";
165
- exclusive: "exclusive";
166
- }>;
167
- seller_id: z.ZodString;
168
- invoice_issuer_id: z.ZodString;
169
- tax_remitter_id: z.ZodString;
170
- tax_service_ref: z.ZodString;
171
- country: z.ZodString;
172
- coverage_evidence_id: z.ZodString;
173
- tax_rate_evidence_id: z.ZodString;
174
- customer_location_evidence_id: z.ZodString;
175
- quoted_at: z.ZodNumber;
176
- expires_at: z.ZodNumber;
177
- }, z.core.$strict>;
178
- signature: z.ZodObject<{
179
- algorithm: z.ZodLiteral<"Ed25519">;
180
- key_id: z.ZodString;
181
- value: z.ZodString;
182
- }, z.core.$strict>;
183
- }, z.core.$strict>;
184
- export type BillingTaxQuote = z.output<typeof billingTaxQuoteSchema>;
185
- export declare const createBillingCheckoutParams: z.ZodObject<{
186
- rail: z.ZodOptional<z.ZodString>;
187
- provider_customer_id: z.ZodString;
188
- provider_price_id: z.ZodString;
189
- trial_days: z.ZodNumber;
190
- tax_quote: z.ZodOptional<z.ZodObject<{
191
- schema_version: z.ZodLiteral<3>;
192
- source: z.ZodObject<{
193
- merchant_id: z.ZodString;
194
- app_id: z.ZodString;
195
- store_id: z.ZodString;
196
- plan_id: z.ZodString;
197
- mode: z.ZodEnum<{
198
- test: "test";
199
- live: "live";
200
- }>;
201
- environment: z.ZodEnum<{
202
- development: "development";
203
- staging: "staging";
204
- production: "production";
205
- }>;
206
- }, z.core.$strict>;
207
- quote: z.ZodObject<{
208
- id: z.ZodString;
209
- currency: z.ZodString;
210
- gross_minor_units: z.ZodString;
211
- net_minor_units: z.ZodString;
212
- tax_minor_units: z.ZodString;
213
- tax_treatment: z.ZodEnum<{
214
- inclusive: "inclusive";
215
- exclusive: "exclusive";
216
- }>;
217
- seller_id: z.ZodString;
218
- invoice_issuer_id: z.ZodString;
219
- tax_remitter_id: z.ZodString;
220
- tax_service_ref: z.ZodString;
221
- country: z.ZodString;
222
- coverage_evidence_id: z.ZodString;
223
- tax_rate_evidence_id: z.ZodString;
224
- customer_location_evidence_id: z.ZodString;
225
- quoted_at: z.ZodNumber;
226
- expires_at: z.ZodNumber;
227
- }, z.core.$strict>;
228
- signature: z.ZodObject<{
229
- algorithm: z.ZodLiteral<"Ed25519">;
230
- key_id: z.ZodString;
231
- value: z.ZodString;
232
- }, z.core.$strict>;
233
- }, z.core.$strict>>;
234
- return_url: z.ZodString;
235
- store_id: z.ZodString;
236
- plan_id: z.ZodString;
237
- }, z.core.$strict>;
238
- export type CreateBillingCheckoutParams = z.input<typeof createBillingCheckoutParams>;
239
- /** A sensitive, owner-only URL. The gateway refuses replay after `expires_at`. */
240
- export declare const billingHostedSessionSchema: z.ZodObject<{
241
- url: z.ZodString;
242
- expires_at: z.ZodNumber;
243
- }, z.core.$strict>;
244
- export type BillingHostedSession = z.output<typeof billingHostedSessionSchema>;
245
- /** An owned recurring checkout. Completing it is not paid evidence. */
246
- export declare const billingCheckoutSessionSchema: z.ZodObject<{
247
- id: z.ZodString;
248
- url: z.ZodString;
249
- expires_at: z.ZodNumber;
250
- }, z.core.$strict>;
251
- export type BillingCheckoutSession = z.output<typeof billingCheckoutSessionSchema>;
252
- /** A durable embedded-session reference. Provider secrets are never in it. */
253
- export declare const billingEmbeddedCheckoutSessionSchema: z.ZodObject<{
254
- id: z.ZodString;
255
- presentation: z.ZodLiteral<"embedded">;
256
- expires_at: z.ZodNumber;
257
- }, z.core.$strict>;
258
- export type BillingEmbeddedCheckoutSession = z.output<typeof billingEmbeddedCheckoutSessionSchema>;
259
- export declare const billingEmbeddedCheckoutScopeSchema: z.ZodObject<{
260
- merchant_id: z.ZodString;
261
- app_id: z.ZodString;
262
- environment: z.ZodEnum<{
263
- development: "development";
264
- staging: "staging";
265
- production: "production";
266
- }>;
267
- mode: z.ZodEnum<{
268
- test: "test";
269
- live: "live";
270
- }>;
271
- }, z.core.$strict>;
272
- export type BillingEmbeddedCheckoutScope = z.output<typeof billingEmbeddedCheckoutScopeSchema>;
273
- export declare const billingEmbeddedCheckoutConfigurationSchema: z.ZodObject<{
274
- scope: z.ZodObject<{
275
- merchant_id: z.ZodString;
276
- app_id: z.ZodString;
277
- environment: z.ZodEnum<{
278
- development: "development";
279
- staging: "staging";
280
- production: "production";
281
- }>;
282
- mode: z.ZodEnum<{
283
- test: "test";
284
- live: "live";
285
- }>;
286
- }, z.core.$strict>;
287
- publishable_key: z.ZodString;
288
- payment_methods: z.ZodArray<z.ZodObject<{
289
- id: z.ZodLiteral<"card">;
290
- available: z.ZodBoolean;
291
- }, z.core.$strict>>;
292
- }, z.core.$strict>;
293
- export type BillingEmbeddedCheckoutConfiguration = z.output<typeof billingEmbeddedCheckoutConfigurationSchema>;
294
- /** An ephemeral processor capability, released only to the authenticated owning workload. */
295
- export declare const billingEmbeddedCheckoutActionSchema: z.ZodObject<{
296
- kind: z.ZodLiteral<"checkout_session">;
297
- provider: z.ZodLiteral<"stripe">;
298
- session_id: z.ZodString;
299
- client_secret: z.ZodString;
300
- publishable_key: z.ZodString;
301
- amount_minor_units: z.ZodString;
302
- currency: z.ZodString;
303
- }, z.core.$strict>;
304
- export type BillingEmbeddedCheckoutAction = z.output<typeof billingEmbeddedCheckoutActionSchema>;
305
- export declare const billingEmbeddedCheckoutBindingSchema: z.ZodObject<{
306
- status: z.ZodEnum<{
307
- open: "open";
308
- complete: "complete";
309
- expired: "expired";
310
- }>;
311
- action: z.ZodNullable<z.ZodObject<{
312
- kind: z.ZodLiteral<"checkout_session">;
313
- provider: z.ZodLiteral<"stripe">;
314
- session_id: z.ZodString;
315
- client_secret: z.ZodString;
316
- publishable_key: z.ZodString;
317
- amount_minor_units: z.ZodString;
318
- currency: z.ZodString;
319
- }, z.core.$strict>>;
320
- scope: z.ZodObject<{
321
- merchant_id: z.ZodString;
322
- app_id: z.ZodString;
323
- environment: z.ZodEnum<{
324
- development: "development";
325
- staging: "staging";
326
- production: "production";
327
- }>;
328
- mode: z.ZodEnum<{
329
- test: "test";
330
- live: "live";
331
- }>;
332
- store_id: z.ZodString;
333
- plan_id: z.ZodString;
334
- provider_customer_id: z.ZodString;
335
- provider_price_id: z.ZodString;
336
- }, z.core.$strict>;
337
- tax_quote: z.ZodObject<{
338
- schema_version: z.ZodLiteral<3>;
339
- source: z.ZodObject<{
340
- merchant_id: z.ZodString;
341
- app_id: z.ZodString;
342
- store_id: z.ZodString;
343
- plan_id: z.ZodString;
344
- mode: z.ZodEnum<{
345
- test: "test";
346
- live: "live";
347
- }>;
348
- environment: z.ZodEnum<{
349
- development: "development";
350
- staging: "staging";
351
- production: "production";
352
- }>;
353
- }, z.core.$strict>;
354
- quote: z.ZodObject<{
355
- id: z.ZodString;
356
- currency: z.ZodString;
357
- gross_minor_units: z.ZodString;
358
- net_minor_units: z.ZodString;
359
- tax_minor_units: z.ZodString;
360
- tax_treatment: z.ZodEnum<{
361
- inclusive: "inclusive";
362
- exclusive: "exclusive";
363
- }>;
364
- seller_id: z.ZodString;
365
- invoice_issuer_id: z.ZodString;
366
- tax_remitter_id: z.ZodString;
367
- tax_service_ref: z.ZodString;
368
- country: z.ZodString;
369
- coverage_evidence_id: z.ZodString;
370
- tax_rate_evidence_id: z.ZodString;
371
- customer_location_evidence_id: z.ZodString;
372
- quoted_at: z.ZodNumber;
373
- expires_at: z.ZodNumber;
374
- }, z.core.$strict>;
375
- signature: z.ZodObject<{
376
- algorithm: z.ZodLiteral<"Ed25519">;
377
- key_id: z.ZodString;
378
- value: z.ZodString;
379
- }, z.core.$strict>;
380
- }, z.core.$strict>;
381
- expires_at: z.ZodNumber;
382
- }, z.core.$strict>;
383
- export type BillingEmbeddedCheckoutBinding = z.output<typeof billingEmbeddedCheckoutBindingSchema>;
384
- /** Provider observations only. Consumers own plan, status and entitlement interpretation. */
385
- export declare const billingSubscriptionSchema: z.ZodObject<{
386
- provider_subscription_id: z.ZodString;
387
- latest_invoice_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
388
- provider_customer_id: z.ZodString;
389
- provider_price_id: z.ZodString;
390
- store_id: z.ZodString;
391
- plan_id: z.ZodString;
392
- livemode: z.ZodBoolean;
393
- status: z.ZodEnum<{
394
- active: "active";
395
- incomplete: "incomplete";
396
- incomplete_expired: "incomplete_expired";
397
- trialing: "trialing";
398
- past_due: "past_due";
399
- unpaid: "unpaid";
400
- canceled: "canceled";
401
- paused: "paused";
402
- }>;
403
- interval: z.ZodEnum<{
404
- month: "month";
405
- year: "year";
406
- }>;
407
- cancel_at_period_end: z.ZodBoolean;
408
- current_period_start: z.ZodNumber;
409
- current_period_end: z.ZodNumber;
410
- trial_ends_at: z.ZodNullable<z.ZodNumber>;
411
- cancel_at: z.ZodNullable<z.ZodNumber>;
412
- cancelled_at: z.ZodNullable<z.ZodNumber>;
413
- }, z.core.$strict>;
414
- export type BillingSubscription = z.output<typeof billingSubscriptionSchema>;
415
- export declare const billingCheckoutObservationSchema: z.ZodObject<{
416
- initial_invoice_id: z.ZodNullable<z.ZodString>;
417
- id: z.ZodString;
418
- status: z.ZodEnum<{
419
- open: "open";
420
- complete: "complete";
421
- expired: "expired";
422
- }>;
423
- store_id: z.ZodString;
424
- plan_id: z.ZodString;
425
- provider_customer_id: z.ZodString;
426
- provider_price_id: z.ZodString;
427
- subscription: z.ZodNullable<z.ZodObject<{
428
- provider_subscription_id: z.ZodString;
429
- latest_invoice_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
430
- provider_customer_id: z.ZodString;
431
- provider_price_id: z.ZodString;
432
- store_id: z.ZodString;
433
- plan_id: z.ZodString;
434
- livemode: z.ZodBoolean;
435
- status: z.ZodEnum<{
436
- active: "active";
437
- incomplete: "incomplete";
438
- incomplete_expired: "incomplete_expired";
439
- trialing: "trialing";
440
- past_due: "past_due";
441
- unpaid: "unpaid";
442
- canceled: "canceled";
443
- paused: "paused";
444
- }>;
445
- interval: z.ZodEnum<{
446
- month: "month";
447
- year: "year";
448
- }>;
449
- cancel_at_period_end: z.ZodBoolean;
450
- current_period_start: z.ZodNumber;
451
- current_period_end: z.ZodNumber;
452
- trial_ends_at: z.ZodNullable<z.ZodNumber>;
453
- cancel_at: z.ZodNullable<z.ZodNumber>;
454
- cancelled_at: z.ZodNullable<z.ZodNumber>;
455
- }, z.core.$strict>>;
456
- }, z.core.$strict>;
457
- export type BillingCheckoutObservation = z.output<typeof billingCheckoutObservationSchema>;
458
- /** The query of a recovery read; the `Idempotency-Key` is its path. */
459
- export declare const retrieveBillingCheckoutOperationQuery: z.ZodObject<{
460
- provider_customer_id: z.ZodString;
461
- provider_price_id: z.ZodString;
462
- store_id: z.ZodString;
463
- plan_id: z.ZodString;
464
- }, z.core.$strict>;
465
- /** A recovery read as a caller names it: the key and the operation it keyed. */
466
- export declare const billingCheckoutOperationParams: z.ZodObject<{
467
- provider_customer_id: z.ZodString;
468
- provider_price_id: z.ZodString;
469
- store_id: z.ZodString;
470
- plan_id: z.ZodString;
471
- idempotency_key: z.ZodString;
472
- }, z.core.$strict>;
473
- export type RetrieveBillingCheckoutOperationParams = z.input<typeof billingCheckoutOperationParams>;
474
- export declare const billingCheckoutOperationSourceSchema: z.ZodObject<{
475
- idempotency_key: z.ZodString;
476
- provider_customer_id: z.ZodString;
477
- provider_price_id: z.ZodString;
478
- store_id: z.ZodString;
479
- plan_id: z.ZodString;
480
- tax_quote_id: z.ZodNullable<z.ZodString>;
481
- merchant_id: z.ZodString;
482
- app_id: z.ZodString;
483
- mode: z.ZodEnum<{
484
- test: "test";
485
- live: "live";
486
- }>;
487
- environment: z.ZodEnum<{
488
- development: "development";
489
- staging: "staging";
490
- production: "production";
491
- }>;
492
- }, z.core.$strict>;
493
- export type BillingCheckoutOperationSource = z.output<typeof billingCheckoutOperationSourceSchema>;
494
- /**
495
- * Read-only recovery of one previously attempted recurring checkout. Neither
496
- * absence nor uncertainty permits cancellation or another financial operation.
497
- */
498
- export declare const billingCheckoutOperationRecoverySchema: z.ZodUnion<readonly [z.ZodObject<{
499
- state: z.ZodEnum<{
500
- not_found: "not_found";
501
- pending: "pending";
502
- indeterminate: "indeterminate";
503
- }>;
504
- source: z.ZodObject<{
505
- idempotency_key: z.ZodString;
506
- provider_customer_id: z.ZodString;
507
- provider_price_id: z.ZodString;
508
- store_id: z.ZodString;
509
- plan_id: z.ZodString;
510
- tax_quote_id: z.ZodNullable<z.ZodString>;
511
- merchant_id: z.ZodString;
512
- app_id: z.ZodString;
513
- mode: z.ZodEnum<{
514
- test: "test";
515
- live: "live";
516
- }>;
517
- environment: z.ZodEnum<{
518
- development: "development";
519
- staging: "staging";
520
- production: "production";
521
- }>;
522
- }, z.core.$strict>;
523
- }, z.core.$strict>, z.ZodObject<{
524
- state: z.ZodLiteral<"succeeded">;
525
- source: z.ZodObject<{
526
- idempotency_key: z.ZodString;
527
- provider_customer_id: z.ZodString;
528
- provider_price_id: z.ZodString;
529
- store_id: z.ZodString;
530
- plan_id: z.ZodString;
531
- tax_quote_id: z.ZodNullable<z.ZodString>;
532
- merchant_id: z.ZodString;
533
- app_id: z.ZodString;
534
- mode: z.ZodEnum<{
535
- test: "test";
536
- live: "live";
537
- }>;
538
- environment: z.ZodEnum<{
539
- development: "development";
540
- staging: "staging";
541
- production: "production";
542
- }>;
543
- }, z.core.$strict>;
544
- checkout: z.ZodObject<{
545
- id: z.ZodString;
546
- expires_at: z.ZodNumber;
547
- url: z.ZodOptional<z.ZodString>;
548
- }, z.core.$strict>;
549
- }, z.core.$strict>]>;
550
- export type BillingCheckoutOperationRecovery = z.output<typeof billingCheckoutOperationRecoverySchema>;
551
- export declare const createBillingPortalParams: z.ZodObject<{
552
- provider_customer_id: z.ZodString;
553
- return_url: z.ZodString;
554
- }, z.core.$strict>;
555
- export type CreateBillingPortalParams = z.input<typeof createBillingPortalParams>;
556
- /** An authenticated authoritative read: one settled, full, non-prorated line only. */
557
- export declare const billingPaidInvoiceSchema: z.ZodObject<{
558
- invoice_id: z.ZodString;
559
- line_id: z.ZodString;
560
- payment_intent_id: z.ZodString;
561
- provider_subscription_id: z.ZodString;
562
- provider_customer_id: z.ZodString;
563
- provider_price_id: z.ZodString;
564
- store_id: z.ZodString;
565
- plan_id: z.ZodString;
566
- livemode: z.ZodBoolean;
567
- currency: z.ZodString;
568
- amount_paid: z.ZodString;
569
- net_amount: z.ZodNullable<z.ZodString>;
570
- tax_amount: z.ZodNullable<z.ZodString>;
571
- period_start: z.ZodNumber;
572
- period_end: z.ZodNumber;
573
- paid_at: z.ZodNumber;
574
- observed_at: z.ZodNumber;
575
- }, z.core.$strict>;
576
- export type BillingPaidInvoice = z.output<typeof billingPaidInvoiceSchema>;
577
- export declare const billingInvoiceStateSchema: z.ZodObject<{
578
- invoice_id: z.ZodString;
579
- line_id: z.ZodString;
580
- payment_intent_id: z.ZodString;
581
- provider_subscription_id: z.ZodString;
582
- provider_customer_id: z.ZodString;
583
- provider_price_id: z.ZodString;
584
- store_id: z.ZodString;
585
- plan_id: z.ZodString;
586
- livemode: z.ZodBoolean;
587
- currency: z.ZodString;
588
- amount_paid: z.ZodString;
589
- net_amount: z.ZodNullable<z.ZodString>;
590
- tax_amount: z.ZodNullable<z.ZodString>;
591
- period_start: z.ZodNumber;
592
- period_end: z.ZodNumber;
593
- paid_at: z.ZodNumber;
594
- observed_at: z.ZodNumber;
595
- charge_id: z.ZodString;
596
- amount_refunded: z.ZodString;
597
- state: z.ZodEnum<{
598
- paid: "paid";
599
- fully_refunded: "fully_refunded";
600
- partially_refunded: "partially_refunded";
601
- }>;
602
- }, z.core.$strict>;
603
- export type BillingInvoiceState = z.output<typeof billingInvoiceStateSchema>;
604
- /** One frozen Peable Tax line behind a signed invoice's tax amount. */
605
- export declare const billingInvoiceTaxLineSchema: z.ZodObject<{
606
- calculation_id: z.ZodString;
607
- country: z.ZodString;
608
- state: z.ZodNullable<z.ZodString>;
609
- tax_type: z.ZodNullable<z.ZodString>;
610
- rate_percentage: z.ZodNullable<z.ZodString>;
611
- taxable_minor_units: z.ZodString;
612
- tax_minor_units: z.ZodString;
613
- inclusive: z.ZodBoolean;
614
- taxability_reason: z.ZodString;
615
- }, z.core.$strict>;
616
- export type BillingInvoiceTaxLine = z.output<typeof billingInvoiceTaxLineSchema>;
617
- /**
618
- * Provider-independent fiscal evidence. Values come from the configured
619
- * authority, never from invoice amounts, merchant metadata, or an application
620
- * tax guess.
621
- */
622
- export declare const billingInvoiceAuthoritySourceSchema: z.ZodObject<{
623
- invoice_id: z.ZodString;
624
- payment_intent_id: z.ZodString;
625
- customer_id: z.ZodString;
626
- subscription_id: z.ZodString;
627
- price_id: z.ZodString;
628
- plan_id: z.ZodString;
629
- merchant_id: z.ZodString;
630
- app_id: z.ZodString;
631
- mode: z.ZodEnum<{
632
- test: "test";
633
- live: "live";
634
- }>;
635
- environment: z.ZodEnum<{
636
- development: "development";
637
- staging: "staging";
638
- production: "production";
639
- }>;
640
- }, z.core.$strict>;
641
- export type BillingInvoiceAuthoritySource = z.output<typeof billingInvoiceAuthoritySourceSchema>;
642
- export declare const billingFinalInvoiceSchema: z.ZodObject<{
643
- platform: z.ZodLiteral<"peable">;
644
- currency: z.ZodString;
645
- gross_minor_units: z.ZodString;
646
- net_minor_units: z.ZodString;
647
- tax_minor_units: z.ZodString;
648
- merchant_fee_minor_units: z.ZodString;
649
- tax_treatment: z.ZodEnum<{
650
- inclusive: "inclusive";
651
- exclusive: "exclusive";
652
- }>;
653
- seller_id: z.ZodString;
654
- invoice_issuer_id: z.ZodString;
655
- tax_quote_id: z.ZodString;
656
- customer_location_evidence_id: z.ZodString;
657
- tax_rate_evidence_id: z.ZodString;
658
- context: z.ZodObject<{
659
- payer_account_id: z.ZodString;
660
- beneficiary_account_id: z.ZodString;
661
- provider_subscription_id: z.ZodString;
662
- offer_id: z.ZodString;
663
- offer_version: z.ZodNumber;
664
- period_start: z.ZodNumber;
665
- period_end: z.ZodNumber;
666
- mode: z.ZodEnum<{
667
- test: "test";
668
- live: "live";
669
- }>;
670
- environment: z.ZodEnum<{
671
- development: "development";
672
- staging: "staging";
673
- production: "production";
674
- }>;
675
- }, z.core.$strict>;
676
- issued_at: z.ZodNumber;
677
- expires_at: z.ZodNumber;
678
- faircoin_quote: z.ZodOptional<z.ZodObject<{
679
- id: z.ZodString;
680
- amount_base_units: z.ZodString;
681
- quoted_at: z.ZodNumber;
682
- expires_at: z.ZodNumber;
683
- rounding_evidence_id: z.ZodString;
684
- }, z.core.$strict>>;
685
- tax_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
686
- calculation_id: z.ZodString;
687
- country: z.ZodString;
688
- state: z.ZodNullable<z.ZodString>;
689
- tax_type: z.ZodNullable<z.ZodString>;
690
- rate_percentage: z.ZodNullable<z.ZodString>;
691
- taxable_minor_units: z.ZodString;
692
- tax_minor_units: z.ZodString;
693
- inclusive: z.ZodBoolean;
694
- taxability_reason: z.ZodString;
695
- }, z.core.$strict>>>;
696
- }, z.core.$strict>;
697
- export type BillingFinalInvoice = z.output<typeof billingFinalInvoiceSchema>;
698
- /** A signed final invoice authority (schema version 3). Verify it against the pinned keys. */
699
- export declare const billingFinalInvoiceAuthoritySchema: z.ZodObject<{
700
- schema_version: z.ZodLiteral<3>;
701
- source: z.ZodObject<{
702
- invoice_id: z.ZodString;
703
- payment_intent_id: z.ZodString;
704
- customer_id: z.ZodString;
705
- subscription_id: z.ZodString;
706
- price_id: z.ZodString;
707
- plan_id: z.ZodString;
708
- merchant_id: z.ZodString;
709
- app_id: z.ZodString;
710
- mode: z.ZodEnum<{
711
- test: "test";
712
- live: "live";
713
- }>;
714
- environment: z.ZodEnum<{
715
- development: "development";
716
- staging: "staging";
717
- production: "production";
718
- }>;
719
- }, z.core.$strict>;
720
- invoice: z.ZodObject<{
721
- platform: z.ZodLiteral<"peable">;
722
- currency: z.ZodString;
723
- gross_minor_units: z.ZodString;
724
- net_minor_units: z.ZodString;
725
- tax_minor_units: z.ZodString;
726
- merchant_fee_minor_units: z.ZodString;
727
- tax_treatment: z.ZodEnum<{
728
- inclusive: "inclusive";
729
- exclusive: "exclusive";
730
- }>;
731
- seller_id: z.ZodString;
732
- invoice_issuer_id: z.ZodString;
733
- tax_quote_id: z.ZodString;
734
- customer_location_evidence_id: z.ZodString;
735
- tax_rate_evidence_id: z.ZodString;
736
- context: z.ZodObject<{
737
- payer_account_id: z.ZodString;
738
- beneficiary_account_id: z.ZodString;
739
- provider_subscription_id: z.ZodString;
740
- offer_id: z.ZodString;
741
- offer_version: z.ZodNumber;
742
- period_start: z.ZodNumber;
743
- period_end: z.ZodNumber;
744
- mode: z.ZodEnum<{
745
- test: "test";
746
- live: "live";
747
- }>;
748
- environment: z.ZodEnum<{
749
- development: "development";
750
- staging: "staging";
751
- production: "production";
752
- }>;
753
- }, z.core.$strict>;
754
- issued_at: z.ZodNumber;
755
- expires_at: z.ZodNumber;
756
- faircoin_quote: z.ZodOptional<z.ZodObject<{
757
- id: z.ZodString;
758
- amount_base_units: z.ZodString;
759
- quoted_at: z.ZodNumber;
760
- expires_at: z.ZodNumber;
761
- rounding_evidence_id: z.ZodString;
762
- }, z.core.$strict>>;
763
- tax_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
764
- calculation_id: z.ZodString;
765
- country: z.ZodString;
766
- state: z.ZodNullable<z.ZodString>;
767
- tax_type: z.ZodNullable<z.ZodString>;
768
- rate_percentage: z.ZodNullable<z.ZodString>;
769
- taxable_minor_units: z.ZodString;
770
- tax_minor_units: z.ZodString;
771
- inclusive: z.ZodBoolean;
772
- taxability_reason: z.ZodString;
773
- }, z.core.$strict>>>;
774
- }, z.core.$strict>;
775
- method: z.ZodEnum<{
776
- card: "card";
777
- faircoin: "faircoin";
778
- }>;
779
- signature: z.ZodObject<{
780
- algorithm: z.ZodLiteral<"Ed25519">;
781
- key_id: z.ZodString;
782
- value: z.ZodString;
783
- }, z.core.$strict>;
784
- }, z.core.$strict>;
785
- export type BillingFinalInvoiceAuthority = z.output<typeof billingFinalInvoiceAuthoritySchema>;
786
- export declare const retrieveBillingInvoiceAuthorityQuery: z.ZodObject<{
787
- include: z.ZodOptional<z.ZodLiteral<"tax_lines">>;
788
- }, z.core.$strip>;
789
- /**
790
- * An automatic FairCoin renewal authorization: an explicit, bounded
791
- * instruction. Transporting it creates no mandate and authorizes no custody of
792
- * payer keys.
793
- */
794
- export declare const billingFaircoinRenewalConsentSchema: z.ZodObject<{
795
- authorization_id: z.ZodString;
796
- payer_account_id: z.ZodString;
797
- merchant_id: z.ZodString;
798
- app_id: z.ZodString;
799
- subscription_id: z.ZodString;
800
- plan_id: z.ZodString;
801
- mode: z.ZodEnum<{
802
- test: "test";
803
- live: "live";
804
- }>;
805
- environment: z.ZodEnum<{
806
- development: "development";
807
- staging: "staging";
808
- production: "production";
809
- }>;
810
- explicit_consent: z.ZodLiteral<true>;
811
- consent_evidence_id: z.ZodString;
812
- maximum_amount_base_units: z.ZodString;
813
- interval: z.ZodLiteral<"month">;
814
- interval_count: z.ZodLiteral<1>;
815
- starts_at: z.ZodNumber;
816
- expires_at: z.ZodNumber;
817
- accepted_at: z.ZodNumber;
818
- }, z.core.$strict>;
819
- export type BillingFaircoinRenewalConsent = z.output<typeof billingFaircoinRenewalConsentSchema>;
820
- export declare const billingFaircoinRenewalRevocationSchema: z.ZodObject<{
821
- authorization_id: z.ZodString;
822
- revoked_at: z.ZodNumber;
823
- revocation_evidence_id: z.ZodString;
824
- }, z.core.$strict>;
825
- export type BillingFaircoinRenewalRevocation = z.output<typeof billingFaircoinRenewalRevocationSchema>;
826
- export declare const billingFaircoinRenewalChoiceSchema: z.ZodUnion<readonly [z.ZodObject<{
827
- method: z.ZodLiteral<"faircoin">;
828
- renewal: z.ZodLiteral<"manual_monthly">;
829
- }, z.core.$strict>, z.ZodObject<{
830
- method: z.ZodLiteral<"faircoin">;
831
- renewal: z.ZodLiteral<"automatic">;
832
- consent: z.ZodObject<{
833
- authorization_id: z.ZodString;
834
- payer_account_id: z.ZodString;
835
- merchant_id: z.ZodString;
836
- app_id: z.ZodString;
837
- subscription_id: z.ZodString;
838
- plan_id: z.ZodString;
839
- mode: z.ZodEnum<{
840
- test: "test";
841
- live: "live";
842
- }>;
843
- environment: z.ZodEnum<{
844
- development: "development";
845
- staging: "staging";
846
- production: "production";
847
- }>;
848
- explicit_consent: z.ZodLiteral<true>;
849
- consent_evidence_id: z.ZodString;
850
- maximum_amount_base_units: z.ZodString;
851
- interval: z.ZodLiteral<"month">;
852
- interval_count: z.ZodLiteral<1>;
853
- starts_at: z.ZodNumber;
854
- expires_at: z.ZodNumber;
855
- accepted_at: z.ZodNumber;
856
- }, z.core.$strict>;
857
- }, z.core.$strict>]>;
858
- export type BillingFaircoinRenewalChoice = z.output<typeof billingFaircoinRenewalChoiceSchema>;
859
- /** A FAIR/USD quote: the FAIR a USD amount costs, ceiled to a base unit, for a bounded time. */
860
- export declare const billingFaircoinFxQuoteSchema: z.ZodObject<{
861
- id: z.ZodString;
862
- currency: z.ZodLiteral<"USD">;
863
- gross_minor_units: z.ZodString;
864
- amount_base_units: z.ZodString;
865
- usd_per_fair: z.ZodString;
866
- source: z.ZodString;
867
- observed_at: z.ZodNumber;
868
- quoted_at: z.ZodNumber;
869
- expires_at: z.ZodNumber;
870
- rounding: z.ZodLiteral<"ceil_to_base_unit">;
871
- }, z.core.$strict>;
872
- export type BillingFaircoinFxQuote = z.output<typeof billingFaircoinFxQuoteSchema>;
873
- /** The body of `cancel_at_period_end`: nothing. */
874
- export declare const cancelBillingSubscriptionParams: z.ZodObject<{}, z.core.$strict>;
875
- export declare const billingRoutes: readonly [{
876
- readonly operationId: "listBillingRails";
877
- readonly method: "get";
878
- readonly path: "/v1/billing/rails";
879
- readonly tag: "Recurring billing";
880
- readonly summary: "List the settlement rails";
881
- readonly description: "The rails this merchant's payers can choose between (card and other fiat providers, FairCoin), default first, with each rail's offers. Pass the payer's choice as `rail` to `ensureCustomer`.";
882
- readonly auth: "service";
883
- readonly scope: "payments:read";
884
- readonly response: z.ZodObject<{
885
- object: z.ZodLiteral<"list">;
886
- data: z.ZodArray<z.ZodObject<{
887
- rail: z.ZodString;
888
- settlement: z.ZodEnum<{
889
- faircoin: "faircoin";
890
- fiat: "fiat";
891
- }>;
892
- default: z.ZodBoolean;
893
- tax_quotes: z.ZodBoolean;
894
- renewal: z.ZodEnum<{
895
- automatic: "automatic";
896
- payer_initiated: "payer_initiated";
897
- }>;
898
- offers: z.ZodNullable<z.ZodArray<z.ZodObject<{
899
- provider_price_id: z.ZodString;
900
- plan_id: z.ZodString;
901
- interval: z.ZodEnum<{
902
- month: "month";
903
- year: "year";
904
- }>;
905
- currency: z.ZodString;
906
- gross_minor_units: z.ZodString;
907
- tax_treatment: z.ZodEnum<{
908
- inclusive: "inclusive";
909
- exclusive: "exclusive";
910
- }>;
911
- }, z.core.$strict>>>;
912
- }, z.core.$strict>>;
913
- }, z.core.$strict>;
914
- readonly sdk: "billing.listRails";
915
- }, {
916
- readonly operationId: "createBillingTaxQuote";
917
- readonly method: "post";
918
- readonly path: "/v1/billing/tax_quotes";
919
- readonly tag: "Recurring billing";
920
- readonly summary: "Quote the tax of a plan";
921
- readonly description: "A signed Peable Tax quote for one plan and one customer location. Verify its signature against the pinned keys before passing it to a checkout.";
922
- readonly auth: "service";
923
- readonly scope: "payments:read";
924
- readonly body: z.ZodObject<{
925
- rail: z.ZodOptional<z.ZodString>;
926
- store_id: z.ZodString;
927
- plan_id: z.ZodString;
928
- provider_price_id: z.ZodOptional<z.ZodString>;
929
- customer_location_evidence_id: z.ZodString;
930
- }, z.core.$strict>;
931
- readonly response: z.ZodObject<{
932
- schema_version: z.ZodLiteral<3>;
933
- source: z.ZodObject<{
934
- merchant_id: z.ZodString;
935
- app_id: z.ZodString;
936
- store_id: z.ZodString;
937
- plan_id: z.ZodString;
938
- mode: z.ZodEnum<{
939
- test: "test";
940
- live: "live";
941
- }>;
942
- environment: z.ZodEnum<{
943
- development: "development";
944
- staging: "staging";
945
- production: "production";
946
- }>;
947
- }, z.core.$strict>;
948
- quote: z.ZodObject<{
949
- id: z.ZodString;
950
- currency: z.ZodString;
951
- gross_minor_units: z.ZodString;
952
- net_minor_units: z.ZodString;
953
- tax_minor_units: z.ZodString;
954
- tax_treatment: z.ZodEnum<{
955
- inclusive: "inclusive";
956
- exclusive: "exclusive";
957
- }>;
958
- seller_id: z.ZodString;
959
- invoice_issuer_id: z.ZodString;
960
- tax_remitter_id: z.ZodString;
961
- tax_service_ref: z.ZodString;
962
- country: z.ZodString;
963
- coverage_evidence_id: z.ZodString;
964
- tax_rate_evidence_id: z.ZodString;
965
- customer_location_evidence_id: z.ZodString;
966
- quoted_at: z.ZodNumber;
967
- expires_at: z.ZodNumber;
968
- }, z.core.$strict>;
969
- signature: z.ZodObject<{
970
- algorithm: z.ZodLiteral<"Ed25519">;
971
- key_id: z.ZodString;
972
- value: z.ZodString;
973
- }, z.core.$strict>;
974
- }, z.core.$strict>;
975
- readonly sdk: "billing.createTaxQuote";
976
- }, {
977
- readonly operationId: "ensureBillingCustomer";
978
- readonly method: "post";
979
- readonly path: "/v1/billing/customers";
980
- readonly tag: "Recurring billing";
981
- readonly summary: "Ensure the billing customer of a store";
982
- readonly description: "The same store always answers the same customer. Requires an `Idempotency-Key` header: it is the operation’s identity at the provider.";
983
- readonly auth: "service";
984
- readonly scope: "payments:write";
985
- readonly body: z.ZodObject<{
986
- store_id: z.ZodString;
987
- store_name: z.ZodString;
988
- rail: z.ZodOptional<z.ZodString>;
989
- }, z.core.$strict>;
990
- readonly response: z.ZodObject<{
991
- provider_customer_id: z.ZodString;
992
- }, z.core.$strict>;
993
- readonly sdk: "billing.ensureCustomer";
994
- }, {
995
- readonly operationId: "createBillingCheckoutSession";
996
- readonly method: "post";
997
- readonly path: "/v1/billing/checkout_sessions";
998
- readonly tag: "Recurring billing";
999
- readonly summary: "Create a subscription checkout";
1000
- readonly description: "A hosted checkout for one plan. Completing it is not paid evidence: read the subscription and its paid invoice. Requires an `Idempotency-Key` header: it is the operation’s identity at the provider.";
1001
- readonly auth: "service";
1002
- readonly scope: "payments:write";
1003
- readonly body: z.ZodObject<{
1004
- rail: z.ZodOptional<z.ZodString>;
1005
- provider_customer_id: z.ZodString;
1006
- provider_price_id: z.ZodString;
1007
- trial_days: z.ZodNumber;
1008
- tax_quote: z.ZodOptional<z.ZodObject<{
1009
- schema_version: z.ZodLiteral<3>;
1010
- source: z.ZodObject<{
1011
- merchant_id: z.ZodString;
1012
- app_id: z.ZodString;
1013
- store_id: z.ZodString;
1014
- plan_id: z.ZodString;
1015
- mode: z.ZodEnum<{
1016
- test: "test";
1017
- live: "live";
1018
- }>;
1019
- environment: z.ZodEnum<{
1020
- development: "development";
1021
- staging: "staging";
1022
- production: "production";
1023
- }>;
1024
- }, z.core.$strict>;
1025
- quote: z.ZodObject<{
1026
- id: z.ZodString;
1027
- currency: z.ZodString;
1028
- gross_minor_units: z.ZodString;
1029
- net_minor_units: z.ZodString;
1030
- tax_minor_units: z.ZodString;
1031
- tax_treatment: z.ZodEnum<{
1032
- inclusive: "inclusive";
1033
- exclusive: "exclusive";
1034
- }>;
1035
- seller_id: z.ZodString;
1036
- invoice_issuer_id: z.ZodString;
1037
- tax_remitter_id: z.ZodString;
1038
- tax_service_ref: z.ZodString;
1039
- country: z.ZodString;
1040
- coverage_evidence_id: z.ZodString;
1041
- tax_rate_evidence_id: z.ZodString;
1042
- customer_location_evidence_id: z.ZodString;
1043
- quoted_at: z.ZodNumber;
1044
- expires_at: z.ZodNumber;
1045
- }, z.core.$strict>;
1046
- signature: z.ZodObject<{
1047
- algorithm: z.ZodLiteral<"Ed25519">;
1048
- key_id: z.ZodString;
1049
- value: z.ZodString;
1050
- }, z.core.$strict>;
1051
- }, z.core.$strict>>;
1052
- return_url: z.ZodString;
1053
- store_id: z.ZodString;
1054
- plan_id: z.ZodString;
1055
- }, z.core.$strict>;
1056
- readonly response: z.ZodObject<{
1057
- id: z.ZodString;
1058
- url: z.ZodString;
1059
- expires_at: z.ZodNumber;
1060
- }, z.core.$strict>;
1061
- readonly sdk: "billing.createCheckoutSession";
1062
- }, {
1063
- readonly operationId: "retrieveBillingEmbeddedCheckoutConfiguration";
1064
- readonly method: "get";
1065
- readonly path: "/v1/billing/embedded_checkout_configuration";
1066
- readonly tag: "Recurring billing";
1067
- readonly summary: "Retrieve the embedded checkout configuration";
1068
- readonly auth: "service";
1069
- readonly scope: "payments:read";
1070
- readonly response: z.ZodObject<{
1071
- scope: z.ZodObject<{
1072
- merchant_id: z.ZodString;
1073
- app_id: z.ZodString;
1074
- environment: z.ZodEnum<{
1075
- development: "development";
1076
- staging: "staging";
1077
- production: "production";
1078
- }>;
1079
- mode: z.ZodEnum<{
1080
- test: "test";
1081
- live: "live";
1082
- }>;
1083
- }, z.core.$strict>;
1084
- publishable_key: z.ZodString;
1085
- payment_methods: z.ZodArray<z.ZodObject<{
1086
- id: z.ZodLiteral<"card">;
1087
- available: z.ZodBoolean;
1088
- }, z.core.$strict>>;
1089
- }, z.core.$strict>;
1090
- readonly sdk: "billing.embeddedCheckoutConfiguration";
1091
- }, {
1092
- readonly operationId: "createBillingEmbeddedCheckoutSession";
1093
- readonly method: "post";
1094
- readonly path: "/v1/billing/embedded_checkout_sessions";
1095
- readonly tag: "Recurring billing";
1096
- readonly summary: "Create an embedded subscription checkout";
1097
- readonly description: "Fiscal checkout only: `tax_quote` is required. Requires an `Idempotency-Key` header: it is the operation’s identity at the provider.";
1098
- readonly auth: "service";
1099
- readonly scope: "payments:write";
1100
- readonly body: z.ZodObject<{
1101
- rail: z.ZodOptional<z.ZodString>;
1102
- provider_customer_id: z.ZodString;
1103
- provider_price_id: z.ZodString;
1104
- trial_days: z.ZodNumber;
1105
- tax_quote: z.ZodOptional<z.ZodObject<{
1106
- schema_version: z.ZodLiteral<3>;
1107
- source: z.ZodObject<{
1108
- merchant_id: z.ZodString;
1109
- app_id: z.ZodString;
1110
- store_id: z.ZodString;
1111
- plan_id: z.ZodString;
1112
- mode: z.ZodEnum<{
1113
- test: "test";
1114
- live: "live";
1115
- }>;
1116
- environment: z.ZodEnum<{
1117
- development: "development";
1118
- staging: "staging";
1119
- production: "production";
1120
- }>;
1121
- }, z.core.$strict>;
1122
- quote: z.ZodObject<{
1123
- id: z.ZodString;
1124
- currency: z.ZodString;
1125
- gross_minor_units: z.ZodString;
1126
- net_minor_units: z.ZodString;
1127
- tax_minor_units: z.ZodString;
1128
- tax_treatment: z.ZodEnum<{
1129
- inclusive: "inclusive";
1130
- exclusive: "exclusive";
1131
- }>;
1132
- seller_id: z.ZodString;
1133
- invoice_issuer_id: z.ZodString;
1134
- tax_remitter_id: z.ZodString;
1135
- tax_service_ref: z.ZodString;
1136
- country: z.ZodString;
1137
- coverage_evidence_id: z.ZodString;
1138
- tax_rate_evidence_id: z.ZodString;
1139
- customer_location_evidence_id: z.ZodString;
1140
- quoted_at: z.ZodNumber;
1141
- expires_at: z.ZodNumber;
1142
- }, z.core.$strict>;
1143
- signature: z.ZodObject<{
1144
- algorithm: z.ZodLiteral<"Ed25519">;
1145
- key_id: z.ZodString;
1146
- value: z.ZodString;
1147
- }, z.core.$strict>;
1148
- }, z.core.$strict>>;
1149
- return_url: z.ZodString;
1150
- store_id: z.ZodString;
1151
- plan_id: z.ZodString;
1152
- }, z.core.$strict>;
1153
- readonly response: z.ZodObject<{
1154
- id: z.ZodString;
1155
- presentation: z.ZodLiteral<"embedded">;
1156
- expires_at: z.ZodNumber;
1157
- }, z.core.$strict>;
1158
- readonly sdk: "billing.createEmbeddedCheckoutSession";
1159
- }, {
1160
- readonly operationId: "retrieveBillingEmbeddedCheckoutAction";
1161
- readonly method: "get";
1162
- readonly path: "/v1/billing/embedded_checkout_sessions/{id}/client_action";
1163
- readonly tag: "Recurring billing";
1164
- readonly summary: "Retrieve an embedded checkout’s client action";
1165
- readonly description: "The ephemeral processor capability to mount the embedded checkout, released only to the owning workload; `action` is `null` once the session is complete or expired.";
1166
- readonly auth: "service";
1167
- readonly scope: "payments:read";
1168
- readonly params: {
1169
- readonly id: "The embedded checkout session (`cs_…`).";
1170
- };
1171
- readonly response: z.ZodObject<{
1172
- status: z.ZodEnum<{
1173
- open: "open";
1174
- complete: "complete";
1175
- expired: "expired";
1176
- }>;
1177
- action: z.ZodNullable<z.ZodObject<{
1178
- kind: z.ZodLiteral<"checkout_session">;
1179
- provider: z.ZodLiteral<"stripe">;
1180
- session_id: z.ZodString;
1181
- client_secret: z.ZodString;
1182
- publishable_key: z.ZodString;
1183
- amount_minor_units: z.ZodString;
1184
- currency: z.ZodString;
1185
- }, z.core.$strict>>;
1186
- scope: z.ZodObject<{
1187
- merchant_id: z.ZodString;
1188
- app_id: z.ZodString;
1189
- environment: z.ZodEnum<{
1190
- development: "development";
1191
- staging: "staging";
1192
- production: "production";
1193
- }>;
1194
- mode: z.ZodEnum<{
1195
- test: "test";
1196
- live: "live";
1197
- }>;
1198
- store_id: z.ZodString;
1199
- plan_id: z.ZodString;
1200
- provider_customer_id: z.ZodString;
1201
- provider_price_id: z.ZodString;
1202
- }, z.core.$strict>;
1203
- tax_quote: z.ZodObject<{
1204
- schema_version: z.ZodLiteral<3>;
1205
- source: z.ZodObject<{
1206
- merchant_id: z.ZodString;
1207
- app_id: z.ZodString;
1208
- store_id: z.ZodString;
1209
- plan_id: z.ZodString;
1210
- mode: z.ZodEnum<{
1211
- test: "test";
1212
- live: "live";
1213
- }>;
1214
- environment: z.ZodEnum<{
1215
- development: "development";
1216
- staging: "staging";
1217
- production: "production";
1218
- }>;
1219
- }, z.core.$strict>;
1220
- quote: z.ZodObject<{
1221
- id: z.ZodString;
1222
- currency: z.ZodString;
1223
- gross_minor_units: z.ZodString;
1224
- net_minor_units: z.ZodString;
1225
- tax_minor_units: z.ZodString;
1226
- tax_treatment: z.ZodEnum<{
1227
- inclusive: "inclusive";
1228
- exclusive: "exclusive";
1229
- }>;
1230
- seller_id: z.ZodString;
1231
- invoice_issuer_id: z.ZodString;
1232
- tax_remitter_id: z.ZodString;
1233
- tax_service_ref: z.ZodString;
1234
- country: z.ZodString;
1235
- coverage_evidence_id: z.ZodString;
1236
- tax_rate_evidence_id: z.ZodString;
1237
- customer_location_evidence_id: z.ZodString;
1238
- quoted_at: z.ZodNumber;
1239
- expires_at: z.ZodNumber;
1240
- }, z.core.$strict>;
1241
- signature: z.ZodObject<{
1242
- algorithm: z.ZodLiteral<"Ed25519">;
1243
- key_id: z.ZodString;
1244
- value: z.ZodString;
1245
- }, z.core.$strict>;
1246
- }, z.core.$strict>;
1247
- expires_at: z.ZodNumber;
1248
- }, z.core.$strict>;
1249
- readonly sdk: "billing.retrieveEmbeddedCheckoutAction";
1250
- }, {
1251
- readonly operationId: "createRecurringBillingPortalSession";
1252
- readonly method: "post";
1253
- readonly path: "/v1/billing/portal_sessions";
1254
- readonly tag: "Recurring billing";
1255
- readonly summary: "Open the provider's billing portal";
1256
- readonly description: "A short-lived, owner-only URL. Requires an `Idempotency-Key` header: it is the operation’s identity at the provider.";
1257
- readonly auth: "service";
1258
- readonly scope: "payments:write";
1259
- readonly body: z.ZodObject<{
1260
- provider_customer_id: z.ZodString;
1261
- return_url: z.ZodString;
1262
- }, z.core.$strict>;
1263
- readonly response: z.ZodObject<{
1264
- url: z.ZodString;
1265
- expires_at: z.ZodNumber;
1266
- }, z.core.$strict>;
1267
- readonly sdk: "billing.createPortalSession";
1268
- }, {
1269
- readonly operationId: "retrieveBillingCheckoutOperation";
1270
- readonly method: "get";
1271
- readonly path: "/v1/billing/checkout_operations/{key}";
1272
- readonly tag: "Recurring billing";
1273
- readonly summary: "Recover a checkout operation";
1274
- readonly description: "Reads the state of a checkout attempted under this `Idempotency-Key`, even after its quote or session expired. Missing, pending or indeterminate never authorizes another create or a cancellation.";
1275
- readonly auth: "service";
1276
- readonly scope: "payments:read";
1277
- readonly params: {
1278
- readonly key: "The `Idempotency-Key` the checkout was created with.";
1279
- };
1280
- readonly query: z.ZodObject<{
1281
- provider_customer_id: z.ZodString;
1282
- provider_price_id: z.ZodString;
1283
- store_id: z.ZodString;
1284
- plan_id: z.ZodString;
1285
- }, z.core.$strict>;
1286
- readonly response: z.ZodUnion<readonly [z.ZodObject<{
1287
- state: z.ZodEnum<{
1288
- not_found: "not_found";
1289
- pending: "pending";
1290
- indeterminate: "indeterminate";
1291
- }>;
1292
- source: z.ZodObject<{
1293
- idempotency_key: z.ZodString;
1294
- provider_customer_id: z.ZodString;
1295
- provider_price_id: z.ZodString;
1296
- store_id: z.ZodString;
1297
- plan_id: z.ZodString;
1298
- tax_quote_id: z.ZodNullable<z.ZodString>;
1299
- merchant_id: z.ZodString;
1300
- app_id: z.ZodString;
1301
- mode: z.ZodEnum<{
1302
- test: "test";
1303
- live: "live";
1304
- }>;
1305
- environment: z.ZodEnum<{
1306
- development: "development";
1307
- staging: "staging";
1308
- production: "production";
1309
- }>;
1310
- }, z.core.$strict>;
1311
- }, z.core.$strict>, z.ZodObject<{
1312
- state: z.ZodLiteral<"succeeded">;
1313
- source: z.ZodObject<{
1314
- idempotency_key: z.ZodString;
1315
- provider_customer_id: z.ZodString;
1316
- provider_price_id: z.ZodString;
1317
- store_id: z.ZodString;
1318
- plan_id: z.ZodString;
1319
- tax_quote_id: z.ZodNullable<z.ZodString>;
1320
- merchant_id: z.ZodString;
1321
- app_id: z.ZodString;
1322
- mode: z.ZodEnum<{
1323
- test: "test";
1324
- live: "live";
1325
- }>;
1326
- environment: z.ZodEnum<{
1327
- development: "development";
1328
- staging: "staging";
1329
- production: "production";
1330
- }>;
1331
- }, z.core.$strict>;
1332
- checkout: z.ZodObject<{
1333
- id: z.ZodString;
1334
- expires_at: z.ZodNumber;
1335
- url: z.ZodOptional<z.ZodString>;
1336
- }, z.core.$strict>;
1337
- }, z.core.$strict>]>;
1338
- readonly sdk: "billing.retrieveCheckoutOperation";
1339
- }, {
1340
- readonly operationId: "retrieveBillingCheckoutSession";
1341
- readonly method: "get";
1342
- readonly path: "/v1/billing/checkout_sessions/{id}";
1343
- readonly tag: "Recurring billing";
1344
- readonly summary: "Retrieve a subscription checkout";
1345
- readonly auth: "service";
1346
- readonly scope: "payments:read";
1347
- readonly params: {
1348
- readonly id: "The checkout session (`cs_…`).";
1349
- };
1350
- readonly response: z.ZodObject<{
1351
- initial_invoice_id: z.ZodNullable<z.ZodString>;
1352
- id: z.ZodString;
1353
- status: z.ZodEnum<{
1354
- open: "open";
1355
- complete: "complete";
1356
- expired: "expired";
1357
- }>;
1358
- store_id: z.ZodString;
1359
- plan_id: z.ZodString;
1360
- provider_customer_id: z.ZodString;
1361
- provider_price_id: z.ZodString;
1362
- subscription: z.ZodNullable<z.ZodObject<{
1363
- provider_subscription_id: z.ZodString;
1364
- latest_invoice_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1365
- provider_customer_id: z.ZodString;
1366
- provider_price_id: z.ZodString;
1367
- store_id: z.ZodString;
1368
- plan_id: z.ZodString;
1369
- livemode: z.ZodBoolean;
1370
- status: z.ZodEnum<{
1371
- active: "active";
1372
- incomplete: "incomplete";
1373
- incomplete_expired: "incomplete_expired";
1374
- trialing: "trialing";
1375
- past_due: "past_due";
1376
- unpaid: "unpaid";
1377
- canceled: "canceled";
1378
- paused: "paused";
1379
- }>;
1380
- interval: z.ZodEnum<{
1381
- month: "month";
1382
- year: "year";
1383
- }>;
1384
- cancel_at_period_end: z.ZodBoolean;
1385
- current_period_start: z.ZodNumber;
1386
- current_period_end: z.ZodNumber;
1387
- trial_ends_at: z.ZodNullable<z.ZodNumber>;
1388
- cancel_at: z.ZodNullable<z.ZodNumber>;
1389
- cancelled_at: z.ZodNullable<z.ZodNumber>;
1390
- }, z.core.$strict>>;
1391
- }, z.core.$strict>;
1392
- readonly sdk: "billing.retrieveCheckout";
1393
- }, {
1394
- readonly operationId: "retrieveBillingInvoiceAuthority";
1395
- readonly method: "get";
1396
- readonly path: "/v1/billing/subscriptions/{id}/invoice_authorities/{invoiceId}";
1397
- readonly tag: "Recurring billing";
1398
- readonly summary: "Retrieve the signed final invoice authority";
1399
- readonly description: "Signed fiscal evidence of one paid invoice. Verify the signature against the pinned keys (`PEABLE_BILLING_AUTHORITY_KEYS`).";
1400
- readonly auth: "service";
1401
- readonly scope: "payments:read";
1402
- readonly params: {
1403
- invoiceId: string;
1404
- id: string;
1405
- };
1406
- readonly query: z.ZodObject<{
1407
- include: z.ZodOptional<z.ZodLiteral<"tax_lines">>;
1408
- }, z.core.$strip>;
1409
- readonly response: z.ZodObject<{
1410
- schema_version: z.ZodLiteral<3>;
1411
- source: z.ZodObject<{
1412
- invoice_id: z.ZodString;
1413
- payment_intent_id: z.ZodString;
1414
- customer_id: z.ZodString;
1415
- subscription_id: z.ZodString;
1416
- price_id: z.ZodString;
1417
- plan_id: z.ZodString;
1418
- merchant_id: z.ZodString;
1419
- app_id: z.ZodString;
1420
- mode: z.ZodEnum<{
1421
- test: "test";
1422
- live: "live";
1423
- }>;
1424
- environment: z.ZodEnum<{
1425
- development: "development";
1426
- staging: "staging";
1427
- production: "production";
1428
- }>;
1429
- }, z.core.$strict>;
1430
- invoice: z.ZodObject<{
1431
- platform: z.ZodLiteral<"peable">;
1432
- currency: z.ZodString;
1433
- gross_minor_units: z.ZodString;
1434
- net_minor_units: z.ZodString;
1435
- tax_minor_units: z.ZodString;
1436
- merchant_fee_minor_units: z.ZodString;
1437
- tax_treatment: z.ZodEnum<{
1438
- inclusive: "inclusive";
1439
- exclusive: "exclusive";
1440
- }>;
1441
- seller_id: z.ZodString;
1442
- invoice_issuer_id: z.ZodString;
1443
- tax_quote_id: z.ZodString;
1444
- customer_location_evidence_id: z.ZodString;
1445
- tax_rate_evidence_id: z.ZodString;
1446
- context: z.ZodObject<{
1447
- payer_account_id: z.ZodString;
1448
- beneficiary_account_id: z.ZodString;
1449
- provider_subscription_id: z.ZodString;
1450
- offer_id: z.ZodString;
1451
- offer_version: z.ZodNumber;
1452
- period_start: z.ZodNumber;
1453
- period_end: z.ZodNumber;
1454
- mode: z.ZodEnum<{
1455
- test: "test";
1456
- live: "live";
1457
- }>;
1458
- environment: z.ZodEnum<{
1459
- development: "development";
1460
- staging: "staging";
1461
- production: "production";
1462
- }>;
1463
- }, z.core.$strict>;
1464
- issued_at: z.ZodNumber;
1465
- expires_at: z.ZodNumber;
1466
- faircoin_quote: z.ZodOptional<z.ZodObject<{
1467
- id: z.ZodString;
1468
- amount_base_units: z.ZodString;
1469
- quoted_at: z.ZodNumber;
1470
- expires_at: z.ZodNumber;
1471
- rounding_evidence_id: z.ZodString;
1472
- }, z.core.$strict>>;
1473
- tax_lines: z.ZodOptional<z.ZodArray<z.ZodObject<{
1474
- calculation_id: z.ZodString;
1475
- country: z.ZodString;
1476
- state: z.ZodNullable<z.ZodString>;
1477
- tax_type: z.ZodNullable<z.ZodString>;
1478
- rate_percentage: z.ZodNullable<z.ZodString>;
1479
- taxable_minor_units: z.ZodString;
1480
- tax_minor_units: z.ZodString;
1481
- inclusive: z.ZodBoolean;
1482
- taxability_reason: z.ZodString;
1483
- }, z.core.$strict>>>;
1484
- }, z.core.$strict>;
1485
- method: z.ZodEnum<{
1486
- card: "card";
1487
- faircoin: "faircoin";
1488
- }>;
1489
- signature: z.ZodObject<{
1490
- algorithm: z.ZodLiteral<"Ed25519">;
1491
- key_id: z.ZodString;
1492
- value: z.ZodString;
1493
- }, z.core.$strict>;
1494
- }, z.core.$strict>;
1495
- readonly sdk: "billing.retrieveFinalInvoiceAuthority";
1496
- }, {
1497
- readonly operationId: "retrieveBillingInvoiceState";
1498
- readonly method: "get";
1499
- readonly path: "/v1/billing/subscriptions/{id}/invoice_states/{invoiceId}";
1500
- readonly tag: "Recurring billing";
1501
- readonly summary: "Retrieve the refund state of a paid invoice";
1502
- readonly auth: "service";
1503
- readonly scope: "payments:read";
1504
- readonly params: {
1505
- invoiceId: string;
1506
- id: string;
1507
- };
1508
- readonly response: z.ZodObject<{
1509
- invoice_id: z.ZodString;
1510
- line_id: z.ZodString;
1511
- payment_intent_id: z.ZodString;
1512
- provider_subscription_id: z.ZodString;
1513
- provider_customer_id: z.ZodString;
1514
- provider_price_id: z.ZodString;
1515
- store_id: z.ZodString;
1516
- plan_id: z.ZodString;
1517
- livemode: z.ZodBoolean;
1518
- currency: z.ZodString;
1519
- amount_paid: z.ZodString;
1520
- net_amount: z.ZodNullable<z.ZodString>;
1521
- tax_amount: z.ZodNullable<z.ZodString>;
1522
- period_start: z.ZodNumber;
1523
- period_end: z.ZodNumber;
1524
- paid_at: z.ZodNumber;
1525
- observed_at: z.ZodNumber;
1526
- charge_id: z.ZodString;
1527
- amount_refunded: z.ZodString;
1528
- state: z.ZodEnum<{
1529
- paid: "paid";
1530
- fully_refunded: "fully_refunded";
1531
- partially_refunded: "partially_refunded";
1532
- }>;
1533
- }, z.core.$strict>;
1534
- readonly sdk: "billing.retrieveInvoiceState";
1535
- }, {
1536
- readonly operationId: "retrieveBillingPaidInvoice";
1537
- readonly method: "get";
1538
- readonly path: "/v1/billing/subscriptions/{id}/paid_invoices/{invoiceId}";
1539
- readonly tag: "Recurring billing";
1540
- readonly summary: "Retrieve a paid invoice";
1541
- readonly description: "Paid-period evidence: answers only for a settled, full, non-prorated invoice.";
1542
- readonly auth: "service";
1543
- readonly scope: "payments:read";
1544
- readonly params: {
1545
- invoiceId: string;
1546
- id: string;
1547
- };
1548
- readonly response: z.ZodObject<{
1549
- invoice_id: z.ZodString;
1550
- line_id: z.ZodString;
1551
- payment_intent_id: z.ZodString;
1552
- provider_subscription_id: z.ZodString;
1553
- provider_customer_id: z.ZodString;
1554
- provider_price_id: z.ZodString;
1555
- store_id: z.ZodString;
1556
- plan_id: z.ZodString;
1557
- livemode: z.ZodBoolean;
1558
- currency: z.ZodString;
1559
- amount_paid: z.ZodString;
1560
- net_amount: z.ZodNullable<z.ZodString>;
1561
- tax_amount: z.ZodNullable<z.ZodString>;
1562
- period_start: z.ZodNumber;
1563
- period_end: z.ZodNumber;
1564
- paid_at: z.ZodNumber;
1565
- observed_at: z.ZodNumber;
1566
- }, z.core.$strict>;
1567
- readonly sdk: "billing.retrievePaidInvoice";
1568
- }, {
1569
- readonly operationId: "retrieveBillingSubscription";
1570
- readonly method: "get";
1571
- readonly path: "/v1/billing/subscriptions/{id}";
1572
- readonly tag: "Recurring billing";
1573
- readonly summary: "Retrieve a subscription";
1574
- readonly auth: "service";
1575
- readonly scope: "payments:read";
1576
- readonly params: {
1577
- id: string;
1578
- };
1579
- readonly response: z.ZodObject<{
1580
- provider_subscription_id: z.ZodString;
1581
- latest_invoice_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1582
- provider_customer_id: z.ZodString;
1583
- provider_price_id: z.ZodString;
1584
- store_id: z.ZodString;
1585
- plan_id: z.ZodString;
1586
- livemode: z.ZodBoolean;
1587
- status: z.ZodEnum<{
1588
- active: "active";
1589
- incomplete: "incomplete";
1590
- incomplete_expired: "incomplete_expired";
1591
- trialing: "trialing";
1592
- past_due: "past_due";
1593
- unpaid: "unpaid";
1594
- canceled: "canceled";
1595
- paused: "paused";
1596
- }>;
1597
- interval: z.ZodEnum<{
1598
- month: "month";
1599
- year: "year";
1600
- }>;
1601
- cancel_at_period_end: z.ZodBoolean;
1602
- current_period_start: z.ZodNumber;
1603
- current_period_end: z.ZodNumber;
1604
- trial_ends_at: z.ZodNullable<z.ZodNumber>;
1605
- cancel_at: z.ZodNullable<z.ZodNumber>;
1606
- cancelled_at: z.ZodNullable<z.ZodNumber>;
1607
- }, z.core.$strict>;
1608
- readonly sdk: "billing.retrieveSubscription";
1609
- }, {
1610
- readonly operationId: "renewBillingSubscription";
1611
- readonly method: "post";
1612
- readonly path: "/v1/billing/subscriptions/{id}/renew";
1613
- readonly tag: "Recurring billing";
1614
- readonly summary: "Renew a payer-initiated subscription";
1615
- readonly description: "Opens a new expiring FAIR payment for one monthly period. Never auto-debits. Requires an `Idempotency-Key` header: it is the operation’s identity at the provider.";
1616
- readonly auth: "service";
1617
- readonly scope: "payments:write";
1618
- readonly params: {
1619
- id: string;
1620
- };
1621
- readonly body: z.ZodObject<{
1622
- rail: z.ZodOptional<z.ZodString>;
1623
- provider_customer_id: z.ZodString;
1624
- provider_price_id: z.ZodString;
1625
- trial_days: z.ZodNumber;
1626
- tax_quote: z.ZodOptional<z.ZodObject<{
1627
- schema_version: z.ZodLiteral<3>;
1628
- source: z.ZodObject<{
1629
- merchant_id: z.ZodString;
1630
- app_id: z.ZodString;
1631
- store_id: z.ZodString;
1632
- plan_id: z.ZodString;
1633
- mode: z.ZodEnum<{
1634
- test: "test";
1635
- live: "live";
1636
- }>;
1637
- environment: z.ZodEnum<{
1638
- development: "development";
1639
- staging: "staging";
1640
- production: "production";
1641
- }>;
1642
- }, z.core.$strict>;
1643
- quote: z.ZodObject<{
1644
- id: z.ZodString;
1645
- currency: z.ZodString;
1646
- gross_minor_units: z.ZodString;
1647
- net_minor_units: z.ZodString;
1648
- tax_minor_units: z.ZodString;
1649
- tax_treatment: z.ZodEnum<{
1650
- inclusive: "inclusive";
1651
- exclusive: "exclusive";
1652
- }>;
1653
- seller_id: z.ZodString;
1654
- invoice_issuer_id: z.ZodString;
1655
- tax_remitter_id: z.ZodString;
1656
- tax_service_ref: z.ZodString;
1657
- country: z.ZodString;
1658
- coverage_evidence_id: z.ZodString;
1659
- tax_rate_evidence_id: z.ZodString;
1660
- customer_location_evidence_id: z.ZodString;
1661
- quoted_at: z.ZodNumber;
1662
- expires_at: z.ZodNumber;
1663
- }, z.core.$strict>;
1664
- signature: z.ZodObject<{
1665
- algorithm: z.ZodLiteral<"Ed25519">;
1666
- key_id: z.ZodString;
1667
- value: z.ZodString;
1668
- }, z.core.$strict>;
1669
- }, z.core.$strict>>;
1670
- return_url: z.ZodString;
1671
- store_id: z.ZodString;
1672
- plan_id: z.ZodString;
1673
- }, z.core.$strict>;
1674
- readonly response: z.ZodObject<{
1675
- id: z.ZodString;
1676
- url: z.ZodString;
1677
- expires_at: z.ZodNumber;
1678
- }, z.core.$strict>;
1679
- readonly sdk: "billing.renewSubscription";
1680
- }, {
1681
- readonly operationId: "cancelBillingSubscriptionAtPeriodEnd";
1682
- readonly method: "post";
1683
- readonly path: "/v1/billing/subscriptions/{id}/cancel_at_period_end";
1684
- readonly tag: "Recurring billing";
1685
- readonly summary: "Cancel a subscription at period end";
1686
- readonly description: "Access continues to the end of the paid period. Requires an `Idempotency-Key` header: it is the operation’s identity at the provider.";
1687
- readonly auth: "service";
1688
- readonly scope: "payments:write";
1689
- readonly params: {
1690
- id: string;
1691
- };
1692
- readonly body: z.ZodObject<{}, z.core.$strict>;
1693
- readonly response: z.ZodObject<{
1694
- provider_subscription_id: z.ZodString;
1695
- latest_invoice_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1696
- provider_customer_id: z.ZodString;
1697
- provider_price_id: z.ZodString;
1698
- store_id: z.ZodString;
1699
- plan_id: z.ZodString;
1700
- livemode: z.ZodBoolean;
1701
- status: z.ZodEnum<{
1702
- active: "active";
1703
- incomplete: "incomplete";
1704
- incomplete_expired: "incomplete_expired";
1705
- trialing: "trialing";
1706
- past_due: "past_due";
1707
- unpaid: "unpaid";
1708
- canceled: "canceled";
1709
- paused: "paused";
1710
- }>;
1711
- interval: z.ZodEnum<{
1712
- month: "month";
1713
- year: "year";
1714
- }>;
1715
- cancel_at_period_end: z.ZodBoolean;
1716
- current_period_start: z.ZodNumber;
1717
- current_period_end: z.ZodNumber;
1718
- trial_ends_at: z.ZodNullable<z.ZodNumber>;
1719
- cancel_at: z.ZodNullable<z.ZodNumber>;
1720
- cancelled_at: z.ZodNullable<z.ZodNumber>;
1721
- }, z.core.$strict>;
1722
- readonly sdk: "billing.cancelAtPeriodEnd";
1723
- }];