@peable.to/contracts 3.1.0 → 4.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.
- package/dist/cjs/resources/billingEngine/public.js +22 -3
- package/dist/cjs/resources/checkout/checkoutSessions.js +34 -9
- package/dist/cjs/resources/checkout/merchants.js +10 -23
- package/dist/cjs/resources/checkout/paymentMethodConfigurations.js +56 -10
- package/dist/cjs/resources/connect/balance.js +5 -0
- package/dist/cjs/resources/connect/connectedAccounts.js +11 -12
- package/dist/cjs/resources/connect/onboarding.js +13 -24
- package/dist/cjs/resources/payments/paymentIntents.js +39 -2
- package/dist/cjs/vocabulary/checkout.js +18 -1
- package/dist/cjs/vocabulary/errors.js +5 -3
- package/dist/cjs/vocabulary/paymentMethodConfigurations.js +24 -4
- package/dist/esm/resources/billingEngine/public.js +22 -3
- package/dist/esm/resources/checkout/checkoutSessions.js +35 -10
- package/dist/esm/resources/checkout/merchants.js +10 -23
- package/dist/esm/resources/checkout/paymentMethodConfigurations.js +57 -11
- package/dist/esm/resources/connect/balance.js +5 -0
- package/dist/esm/resources/connect/connectedAccounts.js +11 -12
- package/dist/esm/resources/connect/onboarding.js +12 -23
- package/dist/esm/resources/payments/paymentIntents.js +39 -2
- package/dist/esm/vocabulary/checkout.js +17 -0
- package/dist/esm/vocabulary/errors.js +5 -3
- package/dist/esm/vocabulary/paymentMethodConfigurations.js +25 -5
- package/dist/types/resources/billingEngine/index.d.ts +16 -2
- package/dist/types/resources/billingEngine/public.d.ts +32 -3
- package/dist/types/resources/checkout/checkoutSessions.d.ts +96 -31
- package/dist/types/resources/checkout/index.d.ts +406 -41
- package/dist/types/resources/checkout/merchants.d.ts +17 -28
- package/dist/types/resources/checkout/paymentMethodConfigurations.d.ts +440 -8
- package/dist/types/resources/connect/balance.d.ts +98 -5
- package/dist/types/resources/connect/connectedAccounts.d.ts +4 -4
- package/dist/types/resources/connect/index.d.ts +101 -10
- package/dist/types/resources/connect/onboarding.d.ts +15 -15
- package/dist/types/resources/connect/payouts.d.ts +64 -2
- package/dist/types/resources/payments/index.d.ts +310 -0
- package/dist/types/resources/payments/paymentIntents.d.ts +380 -0
- package/dist/types/resources/payments/testHelpers.d.ts +31 -0
- package/dist/types/resources/tax/deadlines.d.ts +3 -3
- package/dist/types/resources/tax/index.d.ts +2 -2
- package/dist/types/resources/tax/registrations.d.ts +2 -2
- package/dist/types/vocabulary/checkout.d.ts +13 -0
- package/dist/types/vocabulary/errors.d.ts +5 -3
- package/dist/types/vocabulary/paymentMethodConfigurations.d.ts +21 -7
- package/package.json +1 -1
|
@@ -2,6 +2,23 @@
|
|
|
2
2
|
// Checkout Sessions and Payment Links. Zod-free, so the hosted checkout and
|
|
3
3
|
// the wallet import them without the schemas (`@peable.to/contracts/vocabulary`,
|
|
4
4
|
// re-exported by `@peable.to/shared-types`).
|
|
5
|
+
/**
|
|
6
|
+
* Why FairCoin cannot be paid with on an order right now (ADR 0021). It is
|
|
7
|
+
* still offered — never hidden — and says why:
|
|
8
|
+
*
|
|
9
|
+
* - `faircoin_wallet_missing` — the Peable wallet of the account that receives
|
|
10
|
+
* (the merchant's owner, or the seller) isn't set up yet: no identity key;
|
|
11
|
+
* - `faircoin_network_closed` — this deployment does not open payments on the
|
|
12
|
+
* order's FairCoin network yet (ADR 0002's gate);
|
|
13
|
+
* - `price_unavailable` — no fresh FairCoin price exists to quote a fiat order;
|
|
14
|
+
* - `temporarily_unavailable` — whether the wallet exists could not be checked.
|
|
15
|
+
*/
|
|
16
|
+
export const FAIRCOIN_UNAVAILABLE_REASONS = [
|
|
17
|
+
'faircoin_wallet_missing',
|
|
18
|
+
'faircoin_network_closed',
|
|
19
|
+
'price_unavailable',
|
|
20
|
+
'temporarily_unavailable',
|
|
21
|
+
];
|
|
5
22
|
export const CHECKOUT_SESSION_MODES = ['payment', 'setup', 'subscription'];
|
|
6
23
|
export const CHECKOUT_SESSION_STATUSES = ['open', 'complete', 'expired'];
|
|
7
24
|
export const CHECKOUT_PAYMENT_STATUSES = ['paid', 'unpaid', 'no_payment_required'];
|
|
@@ -55,6 +55,7 @@ export const ERROR_CODE_DESCRIPTIONS = {
|
|
|
55
55
|
parameter_missing: 'A required parameter is missing; `param` names it.',
|
|
56
56
|
parameter_unknown: 'The request carries a parameter this route does not accept; `param` names it.',
|
|
57
57
|
payment_intent_unexpected_state: 'The PaymentIntent is in a status that does not allow this operation.',
|
|
58
|
+
payment_method_locked: 'The payment method cannot be turned off or removed: FairCoin is always offered to every payer; `param` names the field.',
|
|
58
59
|
payout_not_allowed: 'Payouts cannot be created for this account.',
|
|
59
60
|
rate_limited: 'Too many requests; back off and retry.',
|
|
60
61
|
refund_not_cancelable: 'The refund has already left a cancelable state.',
|
|
@@ -65,7 +66,6 @@ export const ERROR_CODE_DESCRIPTIONS = {
|
|
|
65
66
|
test_mode_only: 'This operation exists in test mode only.',
|
|
66
67
|
too_many_streams: 'Too many live streams are open for this merchant.',
|
|
67
68
|
url_invalid: 'The URL is not an allowed https URL.',
|
|
68
|
-
watch_only_violation: 'The extended key carries a private key. Peable only ever accepts watch-only (public) keys.',
|
|
69
69
|
webhook_endpoint_disabled: 'The webhook endpoint is disabled.',
|
|
70
70
|
webhook_endpoint_limit_reached: 'The merchant already has the maximum number of webhook endpoints.',
|
|
71
71
|
account_not_ready: 'The connected account cannot take this payment yet: its onboarding or a capability is incomplete.',
|
|
@@ -126,6 +126,9 @@ export const ERROR_CODE_DESCRIPTIONS = {
|
|
|
126
126
|
promotion_code_minimum_amount: 'The purchase is below the promotion code minimum amount.',
|
|
127
127
|
payment_method_missing: 'No payment method is available to charge.',
|
|
128
128
|
faircoin_cannot_debit: 'A FairCoin invoice cannot be charged automatically: the payer signs every payment.',
|
|
129
|
+
faircoin_price_unavailable: 'No fresh FairCoin price exists right now, so this order cannot be quoted in FAIR. The other payment methods still work; try FairCoin again shortly.',
|
|
130
|
+
faircoin_wallet_missing: "The Peable wallet that receives this payment (the merchant owner's, or the seller's) isn't set up yet, so it cannot be paid in FairCoin. The other payment methods still work.",
|
|
131
|
+
faircoin_network_closed: 'FairCoin payments on this network are not open on this deployment yet. The other payment methods still work.',
|
|
129
132
|
credit_note_exceeds_invoice: "The credit note's amount exceeds what the invoice can still credit.",
|
|
130
133
|
test_clock_unexpected_state: 'The test clock is advancing; wait until it is ready.',
|
|
131
134
|
meter_event_customer_missing: 'The meter event names no customer of this merchant.',
|
|
@@ -138,8 +141,7 @@ export const ERROR_CODE_DESCRIPTIONS = {
|
|
|
138
141
|
// Connect onboarding (ADR 0012 D3): the seller-facing refusals.
|
|
139
142
|
link_expired: 'The onboarding link has expired or was already used; `refresh_url` is where the seller gets a fresh one.',
|
|
140
143
|
wrong_seller: 'The onboarding link names a different Oxy account; sign in as the seller it was minted for.',
|
|
141
|
-
already_registered: 'The seller already
|
|
142
|
-
key_in_use: 'The key already receives payments for another account.',
|
|
144
|
+
already_registered: 'The seller already confirmed FairCoin payments into their Peable wallet.',
|
|
143
145
|
no_faircoin_half: 'The connected account has no FairCoin half to register a key for.',
|
|
144
146
|
// The dashboard routes (`/v1/dashboard/*`, Orbit): the signed-in person, not a credential.
|
|
145
147
|
merchant_missing: 'The application has no merchant in this environment yet; register one (Orbit shows "Set up payments").',
|
|
@@ -1,7 +1,15 @@
|
|
|
1
|
-
// Payment method breadth
|
|
2
|
-
|
|
1
|
+
// Payment method breadth (`pmc_…`, `pmd_…`): the merchant's card-rail methods,
|
|
2
|
+
// and FairCoin, which is always offered (ADR 0021). Zod-free.
|
|
3
|
+
import { CURRENCY_CODES, FIAT_CURRENCY_CODES } from './money.js';
|
|
3
4
|
/**
|
|
4
|
-
* The methods a configuration
|
|
5
|
+
* The methods a configuration lists.
|
|
6
|
+
*
|
|
7
|
+
* `faircoin` is listed and LOCKED (ADR 0021 D2): every payer can always pay
|
|
8
|
+
* with FairCoin, so its entry is always `display_preference.value: 'on'` with
|
|
9
|
+
* `locked: true`, and a create or update that sets it `off` is refused with
|
|
10
|
+
* `payment_method_locked`. It is the chain rail, never a card-provider method:
|
|
11
|
+
* it is never pushed to the provider and never appears in a card PaymentIntent's
|
|
12
|
+
* `payment_method_types`. Every other method is the merchant's to turn on and off.
|
|
5
13
|
*
|
|
6
14
|
* `apple_pay` and `google_pay` are WALLETS over a card: a payment made with one
|
|
7
15
|
* is a `card` payment, so they appear here and never in a PaymentIntent's
|
|
@@ -13,6 +21,7 @@ import { FIAT_CURRENCY_CODES } from './money.js';
|
|
|
13
21
|
* scheme).
|
|
14
22
|
*/
|
|
15
23
|
export const PAYMENT_METHOD_CONFIGURATION_TYPES = [
|
|
24
|
+
'faircoin',
|
|
16
25
|
'card',
|
|
17
26
|
'apple_pay',
|
|
18
27
|
'google_pay',
|
|
@@ -26,18 +35,29 @@ export const PAYMENT_METHOD_CONFIGURATION_TYPES = [
|
|
|
26
35
|
* Why a method cannot be offered whatever the merchant chooses.
|
|
27
36
|
*
|
|
28
37
|
* - `provider_unsupported` — the processing provider does not offer it;
|
|
29
|
-
* - `requires_card` — a wallet rides on card payments, and card is off
|
|
38
|
+
* - `requires_card` — a wallet rides on card payments, and card is off;
|
|
39
|
+
* - `faircoin_wallet_missing` — the Peable wallet of the account that owns
|
|
40
|
+
* the merchant isn't set up yet (no identity key), so FairCoin cannot be
|
|
41
|
+
* received (ADR 0021 D5); the owner sets it up in Peable;
|
|
42
|
+
* - `faircoin_network_closed` — the deployment does not open the merchant's
|
|
43
|
+
* FairCoin network yet (ADR 0002's gate);
|
|
44
|
+
* - `temporarily_unavailable` — the wallet could not be checked just now.
|
|
30
45
|
*/
|
|
31
46
|
export const PAYMENT_METHOD_UNAVAILABLE_REASONS = [
|
|
32
47
|
'provider_unsupported',
|
|
33
48
|
'requires_card',
|
|
49
|
+
'faircoin_wallet_missing',
|
|
50
|
+
'faircoin_network_closed',
|
|
51
|
+
'temporarily_unavailable',
|
|
34
52
|
];
|
|
35
53
|
/**
|
|
36
54
|
* The currencies each method can take a payment in. A method is offered on a
|
|
37
55
|
* payment only when its currency is listed — so iDEAL never appears on a USD
|
|
38
|
-
* payment, and a payer is never shown a method that would fail.
|
|
56
|
+
* payment, and a payer is never shown a method that would fail. FairCoin takes
|
|
57
|
+
* every currency: a `FAIR` order directly, a fiat one at a quoted price (ADR 0021).
|
|
39
58
|
*/
|
|
40
59
|
export const PAYMENT_METHOD_CURRENCIES = Object.freeze({
|
|
60
|
+
faircoin: CURRENCY_CODES,
|
|
41
61
|
card: FIAT_CURRENCY_CODES,
|
|
42
62
|
apple_pay: FIAT_CURRENCY_CODES,
|
|
43
63
|
google_pay: FIAT_CURRENCY_CODES,
|
|
@@ -4822,6 +4822,15 @@ export declare const billingEngineRoutes: readonly [{
|
|
|
4822
4822
|
card: "card";
|
|
4823
4823
|
faircoin: "faircoin";
|
|
4824
4824
|
}>>;
|
|
4825
|
+
faircoin: import("zod").ZodObject<{
|
|
4826
|
+
available: import("zod").ZodBoolean;
|
|
4827
|
+
unavailable_reason: import("zod").ZodNullable<import("zod").ZodEnum<{
|
|
4828
|
+
faircoin_wallet_missing: "faircoin_wallet_missing";
|
|
4829
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
4830
|
+
price_unavailable: "price_unavailable";
|
|
4831
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
4832
|
+
}>>;
|
|
4833
|
+
}, import("zod/v4/core").$strict>;
|
|
4825
4834
|
invoice_pdf: import("zod").ZodString;
|
|
4826
4835
|
}, import("zod/v4/core").$strict>;
|
|
4827
4836
|
}, {
|
|
@@ -4830,12 +4839,17 @@ export declare const billingEngineRoutes: readonly [{
|
|
|
4830
4839
|
readonly path: "/v1/invoices/public/{token}/pay";
|
|
4831
4840
|
readonly tag: "Hosted invoices";
|
|
4832
4841
|
readonly summary: "Pay a hosted invoice";
|
|
4833
|
-
readonly description: "The PaymentIntent the payer completes — a card through the provider’s own fields, FairCoin from the payer’s wallet. The same invoice answers the same intent while it can still be paid.";
|
|
4842
|
+
readonly description: "The PaymentIntent the payer completes in the method they chose — a card through the provider’s own fields, or FairCoin from the payer’s wallet (quoted on a fiat invoice, ADR 0021). The same invoice answers the same intent while it can still be paid in that method.";
|
|
4834
4843
|
readonly auth: "public";
|
|
4835
4844
|
readonly params: {
|
|
4836
4845
|
readonly token: "The hosted invoice token (from `hosted_invoice_url`).";
|
|
4837
4846
|
};
|
|
4838
|
-
readonly body: import("zod").ZodObject<{
|
|
4847
|
+
readonly body: import("zod").ZodObject<{
|
|
4848
|
+
payment_method_type: import("zod").ZodOptional<import("zod").ZodEnum<{
|
|
4849
|
+
card: "card";
|
|
4850
|
+
faircoin: "faircoin";
|
|
4851
|
+
}>>;
|
|
4852
|
+
}, import("zod/v4/core").$strict>;
|
|
4839
4853
|
readonly response: import("zod").ZodObject<{
|
|
4840
4854
|
object: import("zod").ZodLiteral<"public_invoice_payment">;
|
|
4841
4855
|
payment_intent: import("zod").ZodString;
|
|
@@ -59,6 +59,15 @@ export declare const publicInvoiceSchema: z.ZodObject<{
|
|
|
59
59
|
card: "card";
|
|
60
60
|
faircoin: "faircoin";
|
|
61
61
|
}>>;
|
|
62
|
+
faircoin: z.ZodObject<{
|
|
63
|
+
available: z.ZodBoolean;
|
|
64
|
+
unavailable_reason: z.ZodNullable<z.ZodEnum<{
|
|
65
|
+
faircoin_wallet_missing: "faircoin_wallet_missing";
|
|
66
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
67
|
+
price_unavailable: "price_unavailable";
|
|
68
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
69
|
+
}>>;
|
|
70
|
+
}, z.core.$strict>;
|
|
62
71
|
invoice_pdf: z.ZodString;
|
|
63
72
|
}, z.core.$strict>;
|
|
64
73
|
export type PublicInvoice = Expand<z.output<typeof publicInvoiceSchema>>;
|
|
@@ -509,7 +518,13 @@ declare module '../../common/objects' {
|
|
|
509
518
|
'billing_portal.public_session': PublicPortalSession;
|
|
510
519
|
}
|
|
511
520
|
}
|
|
512
|
-
|
|
521
|
+
/** How the payer pays the invoice (ADR 0021 D3). */
|
|
522
|
+
export declare const payPublicInvoiceParams: z.ZodObject<{
|
|
523
|
+
payment_method_type: z.ZodOptional<z.ZodEnum<{
|
|
524
|
+
card: "card";
|
|
525
|
+
faircoin: "faircoin";
|
|
526
|
+
}>>;
|
|
527
|
+
}, z.core.$strict>;
|
|
513
528
|
/** A portal action on one of the customer's subscriptions. */
|
|
514
529
|
export declare const portalSubscriptionParams: z.ZodObject<{
|
|
515
530
|
subscription: z.ZodString;
|
|
@@ -611,6 +626,15 @@ export declare const publicBillingRoutes: readonly [{
|
|
|
611
626
|
card: "card";
|
|
612
627
|
faircoin: "faircoin";
|
|
613
628
|
}>>;
|
|
629
|
+
faircoin: z.ZodObject<{
|
|
630
|
+
available: z.ZodBoolean;
|
|
631
|
+
unavailable_reason: z.ZodNullable<z.ZodEnum<{
|
|
632
|
+
faircoin_wallet_missing: "faircoin_wallet_missing";
|
|
633
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
634
|
+
price_unavailable: "price_unavailable";
|
|
635
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
636
|
+
}>>;
|
|
637
|
+
}, z.core.$strict>;
|
|
614
638
|
invoice_pdf: z.ZodString;
|
|
615
639
|
}, z.core.$strict>;
|
|
616
640
|
}, {
|
|
@@ -619,12 +643,17 @@ export declare const publicBillingRoutes: readonly [{
|
|
|
619
643
|
readonly path: "/v1/invoices/public/{token}/pay";
|
|
620
644
|
readonly tag: "Hosted invoices";
|
|
621
645
|
readonly summary: "Pay a hosted invoice";
|
|
622
|
-
readonly description: "The PaymentIntent the payer completes — a card through the provider’s own fields, FairCoin from the payer’s wallet. The same invoice answers the same intent while it can still be paid.";
|
|
646
|
+
readonly description: "The PaymentIntent the payer completes in the method they chose — a card through the provider’s own fields, or FairCoin from the payer’s wallet (quoted on a fiat invoice, ADR 0021). The same invoice answers the same intent while it can still be paid in that method.";
|
|
623
647
|
readonly auth: "public";
|
|
624
648
|
readonly params: {
|
|
625
649
|
readonly token: "The hosted invoice token (from `hosted_invoice_url`).";
|
|
626
650
|
};
|
|
627
|
-
readonly body: z.ZodObject<{
|
|
651
|
+
readonly body: z.ZodObject<{
|
|
652
|
+
payment_method_type: z.ZodOptional<z.ZodEnum<{
|
|
653
|
+
card: "card";
|
|
654
|
+
faircoin: "faircoin";
|
|
655
|
+
}>>;
|
|
656
|
+
}, z.core.$strict>;
|
|
628
657
|
readonly response: z.ZodObject<{
|
|
629
658
|
object: z.ZodLiteral<"public_invoice_payment">;
|
|
630
659
|
payment_intent: z.ZodString;
|
|
@@ -2,10 +2,6 @@ import { z } from 'zod';
|
|
|
2
2
|
import { type Expand } from '../../common/objects';
|
|
3
3
|
/** The merchant/SDK-facing session — Stripe's Checkout Session. */
|
|
4
4
|
export declare const checkoutSessionSchema: z.ZodObject<{
|
|
5
|
-
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
6
|
-
card: "card";
|
|
7
|
-
faircoin: "faircoin";
|
|
8
|
-
}>>;
|
|
9
5
|
discounts: z.ZodArray<z.ZodObject<{
|
|
10
6
|
coupon: z.ZodString;
|
|
11
7
|
promotion_code: z.ZodNullable<z.ZodString>;
|
|
@@ -174,6 +170,10 @@ export declare const checkoutSessionSchema: z.ZodObject<{
|
|
|
174
170
|
mainnet: "mainnet";
|
|
175
171
|
testnet: "testnet";
|
|
176
172
|
}>>;
|
|
173
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
174
|
+
card: "card";
|
|
175
|
+
faircoin: "faircoin";
|
|
176
|
+
}>>;
|
|
177
177
|
amount_subtotal: z.ZodString;
|
|
178
178
|
amount_total: z.ZodString;
|
|
179
179
|
total_details: z.ZodObject<{
|
|
@@ -314,6 +314,15 @@ export declare const checkoutSessionPublicSchema: z.ZodObject<{
|
|
|
314
314
|
}>;
|
|
315
315
|
}, z.core.$strict>;
|
|
316
316
|
publishable_key: z.ZodNullable<z.ZodString>;
|
|
317
|
+
faircoin: z.ZodNullable<z.ZodObject<{
|
|
318
|
+
available: z.ZodBoolean;
|
|
319
|
+
unavailable_reason: z.ZodNullable<z.ZodEnum<{
|
|
320
|
+
faircoin_wallet_missing: "faircoin_wallet_missing";
|
|
321
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
322
|
+
price_unavailable: "price_unavailable";
|
|
323
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
324
|
+
}>>;
|
|
325
|
+
}, z.core.$strict>>;
|
|
317
326
|
shipping_details: z.ZodNullable<z.ZodObject<{
|
|
318
327
|
name: z.ZodString;
|
|
319
328
|
address: z.ZodObject<{
|
|
@@ -437,6 +446,10 @@ export declare const checkoutSessionPublicSchema: z.ZodObject<{
|
|
|
437
446
|
mainnet: "mainnet";
|
|
438
447
|
testnet: "testnet";
|
|
439
448
|
}>>;
|
|
449
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
450
|
+
card: "card";
|
|
451
|
+
faircoin: "faircoin";
|
|
452
|
+
}>>;
|
|
440
453
|
amount_subtotal: z.ZodString;
|
|
441
454
|
amount_total: z.ZodString;
|
|
442
455
|
total_details: z.ZodObject<{
|
|
@@ -819,8 +832,16 @@ export declare const updateCheckoutSessionPublicParams: z.ZodObject<{
|
|
|
819
832
|
}, z.core.$strict>>;
|
|
820
833
|
}, z.core.$strict>;
|
|
821
834
|
export type UpdateCheckoutSessionPublicParams = z.input<typeof updateCheckoutSessionPublicParams>;
|
|
822
|
-
/**
|
|
823
|
-
|
|
835
|
+
/**
|
|
836
|
+
* `POST /v1/checkout_sessions/{id}/public/confirm` — the order is the
|
|
837
|
+
* session's; the payer only chooses how to pay it (ADR 0021 D3).
|
|
838
|
+
*/
|
|
839
|
+
export declare const confirmCheckoutSessionPublicParams: z.ZodObject<{
|
|
840
|
+
payment_method_type: z.ZodOptional<z.ZodEnum<{
|
|
841
|
+
card: "card";
|
|
842
|
+
faircoin: "faircoin";
|
|
843
|
+
}>>;
|
|
844
|
+
}, z.core.$strict>;
|
|
824
845
|
export type ConfirmCheckoutSessionPublicParams = z.input<typeof confirmCheckoutSessionPublicParams>;
|
|
825
846
|
/** `POST /v1/test_helpers/checkout_sessions/{id}/expire` takes nothing. */
|
|
826
847
|
export declare const expireCheckoutSessionTestHelperParams: z.ZodObject<{}, z.core.$strict>;
|
|
@@ -995,10 +1016,6 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
995
1016
|
}>>;
|
|
996
1017
|
}, z.core.$strict>;
|
|
997
1018
|
readonly response: z.ZodObject<{
|
|
998
|
-
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
999
|
-
card: "card";
|
|
1000
|
-
faircoin: "faircoin";
|
|
1001
|
-
}>>;
|
|
1002
1019
|
discounts: z.ZodArray<z.ZodObject<{
|
|
1003
1020
|
coupon: z.ZodString;
|
|
1004
1021
|
promotion_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1167,6 +1184,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1167
1184
|
mainnet: "mainnet";
|
|
1168
1185
|
testnet: "testnet";
|
|
1169
1186
|
}>>;
|
|
1187
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1188
|
+
card: "card";
|
|
1189
|
+
faircoin: "faircoin";
|
|
1190
|
+
}>>;
|
|
1170
1191
|
amount_subtotal: z.ZodString;
|
|
1171
1192
|
amount_total: z.ZodString;
|
|
1172
1193
|
total_details: z.ZodObject<{
|
|
@@ -1223,10 +1244,6 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1223
1244
|
readonly response: z.ZodObject<{
|
|
1224
1245
|
object: z.ZodLiteral<"list">;
|
|
1225
1246
|
data: z.ZodArray<z.ZodObject<{
|
|
1226
|
-
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1227
|
-
card: "card";
|
|
1228
|
-
faircoin: "faircoin";
|
|
1229
|
-
}>>;
|
|
1230
1247
|
discounts: z.ZodArray<z.ZodObject<{
|
|
1231
1248
|
coupon: z.ZodString;
|
|
1232
1249
|
promotion_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1395,6 +1412,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1395
1412
|
mainnet: "mainnet";
|
|
1396
1413
|
testnet: "testnet";
|
|
1397
1414
|
}>>;
|
|
1415
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1416
|
+
card: "card";
|
|
1417
|
+
faircoin: "faircoin";
|
|
1418
|
+
}>>;
|
|
1398
1419
|
amount_subtotal: z.ZodString;
|
|
1399
1420
|
amount_total: z.ZodString;
|
|
1400
1421
|
total_details: z.ZodObject<{
|
|
@@ -1432,10 +1453,6 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1432
1453
|
expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
|
|
1433
1454
|
}, z.core.$strict>;
|
|
1434
1455
|
readonly response: z.ZodObject<{
|
|
1435
|
-
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1436
|
-
card: "card";
|
|
1437
|
-
faircoin: "faircoin";
|
|
1438
|
-
}>>;
|
|
1439
1456
|
discounts: z.ZodArray<z.ZodObject<{
|
|
1440
1457
|
coupon: z.ZodString;
|
|
1441
1458
|
promotion_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1604,6 +1621,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1604
1621
|
mainnet: "mainnet";
|
|
1605
1622
|
testnet: "testnet";
|
|
1606
1623
|
}>>;
|
|
1624
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1625
|
+
card: "card";
|
|
1626
|
+
faircoin: "faircoin";
|
|
1627
|
+
}>>;
|
|
1607
1628
|
amount_subtotal: z.ZodString;
|
|
1608
1629
|
amount_total: z.ZodString;
|
|
1609
1630
|
total_details: z.ZodObject<{
|
|
@@ -1641,10 +1662,6 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1641
1662
|
expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
|
|
1642
1663
|
}, z.core.$strict>;
|
|
1643
1664
|
readonly response: z.ZodObject<{
|
|
1644
|
-
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1645
|
-
card: "card";
|
|
1646
|
-
faircoin: "faircoin";
|
|
1647
|
-
}>>;
|
|
1648
1665
|
discounts: z.ZodArray<z.ZodObject<{
|
|
1649
1666
|
coupon: z.ZodString;
|
|
1650
1667
|
promotion_code: z.ZodNullable<z.ZodString>;
|
|
@@ -1813,6 +1830,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1813
1830
|
mainnet: "mainnet";
|
|
1814
1831
|
testnet: "testnet";
|
|
1815
1832
|
}>>;
|
|
1833
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1834
|
+
card: "card";
|
|
1835
|
+
faircoin: "faircoin";
|
|
1836
|
+
}>>;
|
|
1816
1837
|
amount_subtotal: z.ZodString;
|
|
1817
1838
|
amount_total: z.ZodString;
|
|
1818
1839
|
total_details: z.ZodObject<{
|
|
@@ -1849,10 +1870,6 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
1849
1870
|
expand: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodString>>>;
|
|
1850
1871
|
}, z.core.$strict>;
|
|
1851
1872
|
readonly response: z.ZodObject<{
|
|
1852
|
-
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
1853
|
-
card: "card";
|
|
1854
|
-
faircoin: "faircoin";
|
|
1855
|
-
}>>;
|
|
1856
1873
|
discounts: z.ZodArray<z.ZodObject<{
|
|
1857
1874
|
coupon: z.ZodString;
|
|
1858
1875
|
promotion_code: z.ZodNullable<z.ZodString>;
|
|
@@ -2021,6 +2038,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2021
2038
|
mainnet: "mainnet";
|
|
2022
2039
|
testnet: "testnet";
|
|
2023
2040
|
}>>;
|
|
2041
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
2042
|
+
card: "card";
|
|
2043
|
+
faircoin: "faircoin";
|
|
2044
|
+
}>>;
|
|
2024
2045
|
amount_subtotal: z.ZodString;
|
|
2025
2046
|
amount_total: z.ZodString;
|
|
2026
2047
|
total_details: z.ZodObject<{
|
|
@@ -2233,6 +2254,15 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2233
2254
|
}>;
|
|
2234
2255
|
}, z.core.$strict>;
|
|
2235
2256
|
publishable_key: z.ZodNullable<z.ZodString>;
|
|
2257
|
+
faircoin: z.ZodNullable<z.ZodObject<{
|
|
2258
|
+
available: z.ZodBoolean;
|
|
2259
|
+
unavailable_reason: z.ZodNullable<z.ZodEnum<{
|
|
2260
|
+
faircoin_wallet_missing: "faircoin_wallet_missing";
|
|
2261
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
2262
|
+
price_unavailable: "price_unavailable";
|
|
2263
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
2264
|
+
}>>;
|
|
2265
|
+
}, z.core.$strict>>;
|
|
2236
2266
|
shipping_details: z.ZodNullable<z.ZodObject<{
|
|
2237
2267
|
name: z.ZodString;
|
|
2238
2268
|
address: z.ZodObject<{
|
|
@@ -2356,6 +2386,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2356
2386
|
mainnet: "mainnet";
|
|
2357
2387
|
testnet: "testnet";
|
|
2358
2388
|
}>>;
|
|
2389
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
2390
|
+
card: "card";
|
|
2391
|
+
faircoin: "faircoin";
|
|
2392
|
+
}>>;
|
|
2359
2393
|
amount_subtotal: z.ZodString;
|
|
2360
2394
|
amount_total: z.ZodString;
|
|
2361
2395
|
total_details: z.ZodObject<{
|
|
@@ -2545,6 +2579,15 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2545
2579
|
}>;
|
|
2546
2580
|
}, z.core.$strict>;
|
|
2547
2581
|
publishable_key: z.ZodNullable<z.ZodString>;
|
|
2582
|
+
faircoin: z.ZodNullable<z.ZodObject<{
|
|
2583
|
+
available: z.ZodBoolean;
|
|
2584
|
+
unavailable_reason: z.ZodNullable<z.ZodEnum<{
|
|
2585
|
+
faircoin_wallet_missing: "faircoin_wallet_missing";
|
|
2586
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
2587
|
+
price_unavailable: "price_unavailable";
|
|
2588
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
2589
|
+
}>>;
|
|
2590
|
+
}, z.core.$strict>>;
|
|
2548
2591
|
shipping_details: z.ZodNullable<z.ZodObject<{
|
|
2549
2592
|
name: z.ZodString;
|
|
2550
2593
|
address: z.ZodObject<{
|
|
@@ -2668,6 +2711,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2668
2711
|
mainnet: "mainnet";
|
|
2669
2712
|
testnet: "testnet";
|
|
2670
2713
|
}>>;
|
|
2714
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
2715
|
+
card: "card";
|
|
2716
|
+
faircoin: "faircoin";
|
|
2717
|
+
}>>;
|
|
2671
2718
|
amount_subtotal: z.ZodString;
|
|
2672
2719
|
amount_total: z.ZodString;
|
|
2673
2720
|
total_details: z.ZodObject<{
|
|
@@ -2696,7 +2743,12 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2696
2743
|
readonly params: {
|
|
2697
2744
|
readonly id: "The Checkout Session (`cs_…`).";
|
|
2698
2745
|
};
|
|
2699
|
-
readonly body: z.ZodObject<{
|
|
2746
|
+
readonly body: z.ZodObject<{
|
|
2747
|
+
payment_method_type: z.ZodOptional<z.ZodEnum<{
|
|
2748
|
+
card: "card";
|
|
2749
|
+
faircoin: "faircoin";
|
|
2750
|
+
}>>;
|
|
2751
|
+
}, z.core.$strict>;
|
|
2700
2752
|
readonly response: z.ZodObject<{
|
|
2701
2753
|
line_items: z.ZodArray<z.ZodObject<{
|
|
2702
2754
|
id: z.ZodString;
|
|
@@ -2809,6 +2861,15 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2809
2861
|
}>;
|
|
2810
2862
|
}, z.core.$strict>;
|
|
2811
2863
|
publishable_key: z.ZodNullable<z.ZodString>;
|
|
2864
|
+
faircoin: z.ZodNullable<z.ZodObject<{
|
|
2865
|
+
available: z.ZodBoolean;
|
|
2866
|
+
unavailable_reason: z.ZodNullable<z.ZodEnum<{
|
|
2867
|
+
faircoin_wallet_missing: "faircoin_wallet_missing";
|
|
2868
|
+
faircoin_network_closed: "faircoin_network_closed";
|
|
2869
|
+
price_unavailable: "price_unavailable";
|
|
2870
|
+
temporarily_unavailable: "temporarily_unavailable";
|
|
2871
|
+
}>>;
|
|
2872
|
+
}, z.core.$strict>>;
|
|
2812
2873
|
shipping_details: z.ZodNullable<z.ZodObject<{
|
|
2813
2874
|
name: z.ZodString;
|
|
2814
2875
|
address: z.ZodObject<{
|
|
@@ -2932,6 +2993,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2932
2993
|
mainnet: "mainnet";
|
|
2933
2994
|
testnet: "testnet";
|
|
2934
2995
|
}>>;
|
|
2996
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
2997
|
+
card: "card";
|
|
2998
|
+
faircoin: "faircoin";
|
|
2999
|
+
}>>;
|
|
2935
3000
|
amount_subtotal: z.ZodString;
|
|
2936
3001
|
amount_total: z.ZodString;
|
|
2937
3002
|
total_details: z.ZodObject<{
|
|
@@ -2965,10 +3030,6 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
2965
3030
|
};
|
|
2966
3031
|
readonly body: z.ZodObject<{}, z.core.$strict>;
|
|
2967
3032
|
readonly response: z.ZodObject<{
|
|
2968
|
-
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
2969
|
-
card: "card";
|
|
2970
|
-
faircoin: "faircoin";
|
|
2971
|
-
}>>;
|
|
2972
3033
|
discounts: z.ZodArray<z.ZodObject<{
|
|
2973
3034
|
coupon: z.ZodString;
|
|
2974
3035
|
promotion_code: z.ZodNullable<z.ZodString>;
|
|
@@ -3137,6 +3198,10 @@ export declare const checkoutSessionRoutes: readonly [{
|
|
|
3137
3198
|
mainnet: "mainnet";
|
|
3138
3199
|
testnet: "testnet";
|
|
3139
3200
|
}>>;
|
|
3201
|
+
payment_method_types: z.ZodArray<z.ZodEnum<{
|
|
3202
|
+
card: "card";
|
|
3203
|
+
faircoin: "faircoin";
|
|
3204
|
+
}>>;
|
|
3140
3205
|
amount_subtotal: z.ZodString;
|
|
3141
3206
|
amount_total: z.ZodString;
|
|
3142
3207
|
total_details: z.ZodObject<{
|