@openrails/billing-ui 0.234.0 → 0.236.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/CHANGELOG.md +142 -2
- package/README.md +119 -85
- package/dist/account/account-billing.d.ts +6 -5
- package/dist/account/change-card-dialog.d.ts +5 -2
- package/dist/account/payment-methods-panel.d.ts +6 -5
- package/dist/buy-button.d.ts +35 -0
- package/dist/cart.d.ts +18 -0
- package/dist/checkout.d.ts +1 -3
- package/dist/client/checkout.d.ts +28 -0
- package/dist/client/client.d.ts +98 -63
- package/dist/client/errors.d.ts +5 -4
- package/dist/client/generated/error-codes.d.ts +1 -1
- package/dist/client/generated/routes.d.ts +142 -99
- package/dist/client/generated/wire.d.ts +185 -98
- package/dist/client/index.d.ts +2 -2
- package/dist/client/types.d.ts +272 -29
- package/dist/{client-CWX6QpLa.js → client-BuvolBPT.js} +498 -326
- package/dist/client-BuvolBPT.js.map +1 -0
- package/dist/client.js +2 -2
- package/dist/components/stripe-card.d.ts +8 -2
- package/dist/components/stripe-wallets.d.ts +12 -0
- package/dist/components/ui/badge.d.ts +1 -1
- package/dist/components/ui/button.d.ts +1 -1
- package/dist/frame.d.ts +5 -5
- package/dist/hooks-2d-XjpuI.js +526 -0
- package/dist/hooks-2d-XjpuI.js.map +1 -0
- package/dist/i18n/context.d.ts +1 -1
- package/dist/i18n/messages.d.ts +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/index.js +1985 -1667
- package/dist/index.js.map +1 -1
- package/dist/lib/money.d.ts +1 -0
- package/dist/lib/offer-label.d.ts +4 -0
- package/dist/locales/de.js +25 -4
- package/dist/locales/de.js.map +1 -1
- package/dist/locales/en.d.ts +25 -4
- package/dist/locales/en.js +25 -4
- package/dist/locales/en.js.map +1 -1
- package/dist/locales/es.js +25 -4
- package/dist/locales/es.js.map +1 -1
- package/dist/locales/ja.js +16 -4
- package/dist/locales/ja.js.map +1 -1
- package/dist/locales/ko.js +16 -4
- package/dist/locales/ko.js.map +1 -1
- package/dist/locales/zh.js +16 -4
- package/dist/locales/zh.js.map +1 -1
- package/dist/offers.d.ts +33 -0
- package/dist/order-checkout.d.ts +30 -0
- package/dist/react/context.d.ts +6 -5
- package/dist/react/hooks.d.ts +17 -16
- package/dist/react/index.d.ts +1 -1
- package/dist/react/provider.d.ts +24 -2
- package/dist/react.js +2 -33
- package/dist/save-payment-method.d.ts +0 -6
- package/dist/styles.css +1 -1
- package/dist/types.d.ts +16 -16
- package/docs/payment-form-contract.md +6 -6
- package/package.json +2 -2
- package/dist/client-CWX6QpLa.js.map +0 -1
- package/dist/config-DZ97SQG2.js +0 -341
- package/dist/config-DZ97SQG2.js.map +0 -1
- package/dist/provider.d.ts +0 -18
- package/dist/react.js.map +0 -1
|
@@ -39,20 +39,6 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
39
39
|
};
|
|
40
40
|
readonly errors: readonly ["service_unavailable"];
|
|
41
41
|
readonly errorSets: readonly ["tier:public"];
|
|
42
|
-
}, {
|
|
43
|
-
readonly method: "GET";
|
|
44
|
-
readonly path: "/metrics";
|
|
45
|
-
readonly group: "meta";
|
|
46
|
-
readonly auth: "public";
|
|
47
|
-
readonly permission: null;
|
|
48
|
-
readonly sensitive: false;
|
|
49
|
-
readonly mountedWhen: null;
|
|
50
|
-
readonly request: null;
|
|
51
|
-
readonly responses: {
|
|
52
|
-
readonly 200: "text/plain";
|
|
53
|
-
};
|
|
54
|
-
readonly errors: readonly [];
|
|
55
|
-
readonly errorSets: readonly ["tier:public"];
|
|
56
42
|
}, {
|
|
57
43
|
readonly method: "GET";
|
|
58
44
|
readonly path: "/v1/config";
|
|
@@ -79,7 +65,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
79
65
|
readonly responses: {
|
|
80
66
|
readonly 200: "SupportedTokensResponse";
|
|
81
67
|
};
|
|
82
|
-
readonly errors: readonly ["
|
|
68
|
+
readonly errors: readonly ["resource_conflict"];
|
|
83
69
|
readonly errorSets: readonly ["tier:public", "request"];
|
|
84
70
|
}, {
|
|
85
71
|
readonly method: "GET";
|
|
@@ -93,7 +79,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
93
79
|
readonly responses: {
|
|
94
80
|
readonly 200: "CheckoutSession";
|
|
95
81
|
};
|
|
96
|
-
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "
|
|
82
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
|
|
97
83
|
readonly errorSets: readonly ["tier:checkout_session"];
|
|
98
84
|
}, {
|
|
99
85
|
readonly method: "POST";
|
|
@@ -107,7 +93,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
107
93
|
readonly responses: {
|
|
108
94
|
readonly 200: "CheckoutSessionPayResult";
|
|
109
95
|
};
|
|
110
|
-
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "
|
|
96
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "customer_proof_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
|
|
111
97
|
readonly errorSets: readonly ["tier:checkout_session", "request"];
|
|
112
98
|
}, {
|
|
113
99
|
readonly method: "GET";
|
|
@@ -163,7 +149,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
163
149
|
readonly responses: {
|
|
164
150
|
readonly 200: "CheckoutSession";
|
|
165
151
|
};
|
|
166
|
-
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "
|
|
152
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "checkout_session_not_found", "checkout_session_unavailable", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
|
|
167
153
|
readonly errorSets: readonly ["tier:customer"];
|
|
168
154
|
}, {
|
|
169
155
|
readonly method: "POST";
|
|
@@ -177,7 +163,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
177
163
|
readonly responses: {
|
|
178
164
|
readonly 200: "CheckoutSessionPayResult";
|
|
179
165
|
};
|
|
180
|
-
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "
|
|
166
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "checkout_offer_unavailable", "checkout_payment_in_progress", "checkout_request_invalid", "checkout_session_expired", "checkout_session_not_found", "checkout_session_unavailable", "customer_action_required", "customer_proof_required", "idempotency_key_reused", "insufficient_funds", "invalid_param", "payment_method_required", "payment_method_stale", "payment_provider_rejected", "resource_access_denied", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_paid_through", "subscription_resumable"];
|
|
181
167
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
182
168
|
}, {
|
|
183
169
|
readonly method: "GET";
|
|
@@ -215,7 +201,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
215
201
|
readonly permission: null;
|
|
216
202
|
readonly sensitive: false;
|
|
217
203
|
readonly mountedWhen: null;
|
|
218
|
-
readonly request: "
|
|
204
|
+
readonly request: "PreviewMyOrderParams";
|
|
219
205
|
readonly responses: {
|
|
220
206
|
readonly 200: "OrderPreview";
|
|
221
207
|
};
|
|
@@ -229,12 +215,12 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
229
215
|
readonly permission: null;
|
|
230
216
|
readonly sensitive: false;
|
|
231
217
|
readonly mountedWhen: null;
|
|
232
|
-
readonly request: "
|
|
218
|
+
readonly request: "CreateMyOrderParams";
|
|
233
219
|
readonly responses: {
|
|
234
220
|
readonly 200: "Order";
|
|
235
221
|
readonly 201: "Order";
|
|
236
222
|
};
|
|
237
|
-
readonly errors: readonly ["already_owned", "card_attempts_blocked", "customer_action_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_line_unavailable", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_method_stale", "payment_option_unavailable", "quantity_not_allowed", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
223
|
+
readonly errors: readonly ["already_owned", "card_attempts_blocked", "card_declined", "customer_action_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_line_unavailable", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_failed", "payment_method_stale", "payment_option_unavailable", "payment_provider_rejected", "quantity_not_allowed", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
238
224
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
239
225
|
}, {
|
|
240
226
|
readonly method: "GET";
|
|
@@ -248,7 +234,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
248
234
|
readonly responses: {
|
|
249
235
|
readonly 200: "ListPage<Order>";
|
|
250
236
|
};
|
|
251
|
-
readonly errors: readonly ["invalid_cursor", "service_unavailable"];
|
|
237
|
+
readonly errors: readonly ["invalid_cursor", "invalid_query", "service_unavailable"];
|
|
252
238
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
253
239
|
}, {
|
|
254
240
|
readonly method: "GET";
|
|
@@ -276,7 +262,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
276
262
|
readonly responses: {
|
|
277
263
|
readonly 200: "Order";
|
|
278
264
|
};
|
|
279
|
-
readonly errors: readonly ["card_attempts_blocked", "customer_action_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_method_stale", "payment_option_unavailable", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
265
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "customer_action_required", "idempotency_key_in_use", "idempotency_key_required", "idempotency_key_reused", "invalid_param", "order_not_payable", "order_payment_in_progress", "order_total_changed", "payment_failed", "payment_method_stale", "payment_option_unavailable", "payment_provider_rejected", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
280
266
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
281
267
|
}, {
|
|
282
268
|
readonly method: "POST";
|
|
@@ -290,7 +276,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
290
276
|
readonly responses: {
|
|
291
277
|
readonly 200: "Order";
|
|
292
278
|
};
|
|
293
|
-
readonly errors: readonly ["customer_action_required", "customer_session_required", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
279
|
+
readonly errors: readonly ["card_declined", "customer_action_required", "customer_session_required", "payment_failed", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
294
280
|
readonly errorSets: readonly ["tier:customer"];
|
|
295
281
|
}, {
|
|
296
282
|
readonly method: "POST";
|
|
@@ -306,6 +292,76 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
306
292
|
};
|
|
307
293
|
readonly errors: readonly ["order_not_cancelable", "resource_not_found", "service_unavailable"];
|
|
308
294
|
readonly errorSets: readonly ["tier:customer"];
|
|
295
|
+
}, {
|
|
296
|
+
readonly method: "GET";
|
|
297
|
+
readonly path: "/v1/orders/{id}/solana-pay";
|
|
298
|
+
readonly group: "checkout";
|
|
299
|
+
readonly auth: "public";
|
|
300
|
+
readonly permission: null;
|
|
301
|
+
readonly sensitive: false;
|
|
302
|
+
readonly mountedWhen: "solana";
|
|
303
|
+
readonly request: null;
|
|
304
|
+
readonly responses: {
|
|
305
|
+
readonly 200: "SolanaPayGetResponse";
|
|
306
|
+
};
|
|
307
|
+
readonly errors: readonly ["order_not_payable", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
308
|
+
readonly errorSets: readonly ["tier:public"];
|
|
309
|
+
}, {
|
|
310
|
+
readonly method: "POST";
|
|
311
|
+
readonly path: "/v1/orders/{id}/solana-pay";
|
|
312
|
+
readonly group: "checkout";
|
|
313
|
+
readonly auth: "public";
|
|
314
|
+
readonly permission: null;
|
|
315
|
+
readonly sensitive: false;
|
|
316
|
+
readonly mountedWhen: "solana";
|
|
317
|
+
readonly request: "SolanaPayPostRequest";
|
|
318
|
+
readonly responses: {
|
|
319
|
+
readonly 200: "SolanaPayPostResponse";
|
|
320
|
+
};
|
|
321
|
+
readonly errors: readonly ["invalid_param", "order_not_payable", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
322
|
+
readonly errorSets: readonly ["tier:public", "request"];
|
|
323
|
+
}, {
|
|
324
|
+
readonly method: "GET";
|
|
325
|
+
readonly path: "/v1/me/cart";
|
|
326
|
+
readonly group: "customer";
|
|
327
|
+
readonly auth: "customer";
|
|
328
|
+
readonly permission: null;
|
|
329
|
+
readonly sensitive: false;
|
|
330
|
+
readonly mountedWhen: null;
|
|
331
|
+
readonly request: null;
|
|
332
|
+
readonly responses: {
|
|
333
|
+
readonly 200: "Cart";
|
|
334
|
+
};
|
|
335
|
+
readonly errors: readonly ["service_unavailable"];
|
|
336
|
+
readonly errorSets: readonly ["tier:customer"];
|
|
337
|
+
}, {
|
|
338
|
+
readonly method: "PUT";
|
|
339
|
+
readonly path: "/v1/me/cart/lines/{price_id}";
|
|
340
|
+
readonly group: "customer";
|
|
341
|
+
readonly auth: "customer";
|
|
342
|
+
readonly permission: null;
|
|
343
|
+
readonly sensitive: false;
|
|
344
|
+
readonly mountedWhen: null;
|
|
345
|
+
readonly request: "SetCartLineParams";
|
|
346
|
+
readonly responses: {
|
|
347
|
+
readonly 200: "Cart";
|
|
348
|
+
};
|
|
349
|
+
readonly errors: readonly ["invalid_param", "resource_not_found", "service_unavailable"];
|
|
350
|
+
readonly errorSets: readonly ["tier:customer", "request"];
|
|
351
|
+
}, {
|
|
352
|
+
readonly method: "DELETE";
|
|
353
|
+
readonly path: "/v1/me/cart";
|
|
354
|
+
readonly group: "customer";
|
|
355
|
+
readonly auth: "customer";
|
|
356
|
+
readonly permission: null;
|
|
357
|
+
readonly sensitive: false;
|
|
358
|
+
readonly mountedWhen: null;
|
|
359
|
+
readonly request: null;
|
|
360
|
+
readonly responses: {
|
|
361
|
+
readonly 204: null;
|
|
362
|
+
};
|
|
363
|
+
readonly errors: readonly ["service_unavailable"];
|
|
364
|
+
readonly errorSets: readonly ["tier:customer"];
|
|
309
365
|
}, {
|
|
310
366
|
readonly method: "GET";
|
|
311
367
|
readonly path: "/v1/catalog/products";
|
|
@@ -318,7 +374,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
318
374
|
readonly responses: {
|
|
319
375
|
readonly 200: "ListPage<Product>";
|
|
320
376
|
};
|
|
321
|
-
readonly errors: readonly [];
|
|
377
|
+
readonly errors: readonly ["invalid_query"];
|
|
322
378
|
readonly errorSets: readonly ["tier:public", "request"];
|
|
323
379
|
}, {
|
|
324
380
|
readonly method: "POST";
|
|
@@ -360,7 +416,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
360
416
|
readonly responses: {
|
|
361
417
|
readonly 200: "Subscription";
|
|
362
418
|
};
|
|
363
|
-
readonly errors: readonly ["authentication_required", "card_declined", "invalid_param", "payment_method_not_psp_vaulted", "payment_method_psp_mismatch", "payment_method_same_vault", "payment_provider_rejected", "rebill_terms_committed", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
419
|
+
readonly errors: readonly ["authentication_required", "card_declined", "default_payment_method_required", "invalid_param", "payment_method_not_psp_vaulted", "payment_method_psp_mismatch", "payment_method_same_vault", "payment_method_stale", "payment_provider_rejected", "rebill_terms_committed", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
364
420
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
365
421
|
}, {
|
|
366
422
|
readonly method: "GET";
|
|
@@ -407,32 +463,32 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
407
463
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
408
464
|
}, {
|
|
409
465
|
readonly method: "POST";
|
|
410
|
-
readonly path: "/v1/me/subscriptions/{id}/change
|
|
466
|
+
readonly path: "/v1/me/subscriptions/{id}/change";
|
|
411
467
|
readonly group: "customer";
|
|
412
468
|
readonly auth: "customer";
|
|
413
469
|
readonly permission: null;
|
|
414
470
|
readonly sensitive: false;
|
|
415
471
|
readonly mountedWhen: null;
|
|
416
|
-
readonly request: "
|
|
472
|
+
readonly request: "CustomerChangeSubscriptionParams";
|
|
417
473
|
readonly responses: {
|
|
418
|
-
readonly 200: "
|
|
419
|
-
readonly 202: "
|
|
474
|
+
readonly 200: "SubscriptionChange";
|
|
475
|
+
readonly 202: "SubscriptionChange";
|
|
420
476
|
};
|
|
421
|
-
readonly errors: readonly ["authentication_required", "card_declined", "customer_action_required", "customer_email_required", "invalid_param", "payment_duplicate_refused", "payment_method_stale", "payment_provider_rejected", "price_change_currency_mismatch", "price_not_found", "product_not_found", "rebill_terms_committed", "resource_conflict", "resource_not_found", "scheduled_change_exists", "service_unavailable", "solana_rpc_unavailable", "solana_transaction_refused", "
|
|
477
|
+
readonly errors: readonly ["authentication_required", "card_declined", "customer_action_required", "customer_email_required", "invalid_param", "payment_duplicate_refused", "payment_method_stale", "payment_provider_rejected", "price_change_currency_mismatch", "price_not_found", "product_not_found", "quantity_not_allowed", "rebill_terms_committed", "resource_conflict", "resource_not_found", "scheduled_change_exists", "service_unavailable", "solana_rpc_unavailable", "solana_transaction_refused", "subscription_change_already_scheduled", "subscription_change_credit_exceeds_price", "subscription_change_cycle_unknown", "subscription_change_idempotency_conflict", "subscription_change_idempotency_key_required", "subscription_change_in_flight", "subscription_change_period_unknown", "subscription_change_provider_conflict", "subscription_change_refused", "subscription_change_renewal_due", "subscription_change_requires_linked_plan", "subscription_change_target_inactive", "subscription_change_unsupported_on_rail", "subscription_not_active", "subscription_not_found"];
|
|
422
478
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
423
479
|
}, {
|
|
424
480
|
readonly method: "POST";
|
|
425
|
-
readonly path: "/v1/me/subscriptions/{id}/change
|
|
481
|
+
readonly path: "/v1/me/subscriptions/{id}/change/preview";
|
|
426
482
|
readonly group: "customer";
|
|
427
483
|
readonly auth: "customer";
|
|
428
484
|
readonly permission: null;
|
|
429
485
|
readonly sensitive: false;
|
|
430
486
|
readonly mountedWhen: null;
|
|
431
|
-
readonly request: "
|
|
487
|
+
readonly request: "PreviewSubscriptionChangeParams";
|
|
432
488
|
readonly responses: {
|
|
433
|
-
readonly 200: "
|
|
489
|
+
readonly 200: "SubscriptionChangePreview";
|
|
434
490
|
};
|
|
435
|
-
readonly errors: readonly ["authentication_required", "card_declined", "customer_email_required", "invalid_param", "payment_method_stale", "payment_provider_rejected", "price_change_currency_mismatch", "price_not_found", "product_not_found", "resource_conflict", "resource_not_found", "service_unavailable", "
|
|
491
|
+
readonly errors: readonly ["authentication_required", "card_declined", "customer_email_required", "invalid_param", "payment_method_stale", "payment_provider_rejected", "price_change_currency_mismatch", "price_not_found", "product_not_found", "quantity_not_allowed", "resource_conflict", "resource_not_found", "service_unavailable", "subscription_change_already_scheduled", "subscription_change_credit_exceeds_price", "subscription_change_cycle_unknown", "subscription_change_in_flight", "subscription_change_period_unknown", "subscription_change_provider_conflict", "subscription_change_renewal_due", "subscription_change_requires_linked_plan", "subscription_change_target_inactive", "subscription_change_unsupported_on_rail", "subscription_not_active", "subscription_not_found"];
|
|
436
492
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
437
493
|
}, {
|
|
438
494
|
readonly method: "GET";
|
|
@@ -448,34 +504,6 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
448
504
|
};
|
|
449
505
|
readonly errors: readonly ["authentication_required", "invalid_cursor", "invalid_param", "invalid_query"];
|
|
450
506
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
451
|
-
}, {
|
|
452
|
-
readonly method: "GET";
|
|
453
|
-
readonly path: "/v1/me/product-access";
|
|
454
|
-
readonly group: "customer";
|
|
455
|
-
readonly auth: "customer";
|
|
456
|
-
readonly permission: null;
|
|
457
|
-
readonly sensitive: false;
|
|
458
|
-
readonly mountedWhen: null;
|
|
459
|
-
readonly request: null;
|
|
460
|
-
readonly responses: {
|
|
461
|
-
readonly 200: "ListPage<ProductAccessGrant>";
|
|
462
|
-
};
|
|
463
|
-
readonly errors: readonly ["authentication_required", "invalid_cursor", "invalid_param", "invalid_query"];
|
|
464
|
-
readonly errorSets: readonly ["tier:customer", "request"];
|
|
465
|
-
}, {
|
|
466
|
-
readonly method: "GET";
|
|
467
|
-
readonly path: "/v1/me/spend-limits";
|
|
468
|
-
readonly group: "customer";
|
|
469
|
-
readonly auth: "customer";
|
|
470
|
-
readonly permission: null;
|
|
471
|
-
readonly sensitive: false;
|
|
472
|
-
readonly mountedWhen: null;
|
|
473
|
-
readonly request: null;
|
|
474
|
-
readonly responses: {
|
|
475
|
-
readonly 200: "SpendLimits";
|
|
476
|
-
};
|
|
477
|
-
readonly errors: readonly ["currency_unsupported"];
|
|
478
|
-
readonly errorSets: readonly ["tier:customer", "request"];
|
|
479
507
|
}, {
|
|
480
508
|
readonly method: "GET";
|
|
481
509
|
readonly path: "/v1/me";
|
|
@@ -605,17 +633,17 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
605
633
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
606
634
|
}, {
|
|
607
635
|
readonly method: "PUT";
|
|
608
|
-
readonly path: "/v1/me/
|
|
636
|
+
readonly path: "/v1/me/default-payment-methods/{currency}";
|
|
609
637
|
readonly group: "customer";
|
|
610
638
|
readonly auth: "customer";
|
|
611
639
|
readonly permission: null;
|
|
612
640
|
readonly sensitive: false;
|
|
613
641
|
readonly mountedWhen: null;
|
|
614
|
-
readonly request: "
|
|
642
|
+
readonly request: "SetDefaultPaymentMethodParams";
|
|
615
643
|
readonly responses: {
|
|
616
|
-
readonly 200: "
|
|
644
|
+
readonly 200: "DefaultPaymentMethod";
|
|
617
645
|
};
|
|
618
|
-
readonly errors: readonly ["
|
|
646
|
+
readonly errors: readonly ["authentication_required", "card_declined", "default_payment_method_invalid", "invalid_param", "payment_method_not_psp_vaulted", "payment_method_psp_mismatch", "payment_method_same_vault", "payment_method_stale", "payment_provider_rejected", "rebill_terms_committed", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
619
647
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
620
648
|
}, {
|
|
621
649
|
readonly method: "GET";
|
|
@@ -643,7 +671,7 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
643
671
|
readonly responses: {
|
|
644
672
|
readonly 201: "PaymentMethod";
|
|
645
673
|
};
|
|
646
|
-
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "
|
|
674
|
+
readonly errors: readonly ["card_attempts_blocked", "card_declined", "card_not_saved", "card_requires_https", "invalid_param", "payment_duplicate_refused", "payment_method_stale", "payment_provider_rejected", "provider_outcome_unknown", "service_unavailable"];
|
|
647
675
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
648
676
|
}, {
|
|
649
677
|
readonly method: "PUT";
|
|
@@ -658,40 +686,25 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
658
686
|
readonly 200: "PaymentMethod";
|
|
659
687
|
readonly 202: null;
|
|
660
688
|
};
|
|
661
|
-
readonly errors: readonly ["card_declined", "card_not_saved", "card_requires_https", "
|
|
689
|
+
readonly errors: readonly ["card_declined", "card_not_saved", "card_requires_https", "invalid_param", "payment_method_update_failed", "payment_method_update_retry_required", "payment_method_update_unsupported", "payment_provider_rejected", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
662
690
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
663
691
|
}, {
|
|
664
|
-
readonly method: "
|
|
692
|
+
readonly method: "PATCH";
|
|
665
693
|
readonly path: "/v1/me/payment-methods/{id}";
|
|
666
694
|
readonly group: "customer";
|
|
667
695
|
readonly auth: "customer";
|
|
668
696
|
readonly permission: null;
|
|
669
697
|
readonly sensitive: false;
|
|
670
698
|
readonly mountedWhen: null;
|
|
671
|
-
readonly request:
|
|
672
|
-
readonly responses: {
|
|
673
|
-
readonly 202: null;
|
|
674
|
-
readonly 204: null;
|
|
675
|
-
};
|
|
676
|
-
readonly errors: readonly ["invalid_param", "payment_method_delete_failed", "payment_method_delete_unsupported", "rate_limit_exceeded", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
677
|
-
readonly errorSets: readonly ["tier:customer"];
|
|
678
|
-
}, {
|
|
679
|
-
readonly method: "POST";
|
|
680
|
-
readonly path: "/v1/me/payment-method-setups";
|
|
681
|
-
readonly group: "customer";
|
|
682
|
-
readonly auth: "customer";
|
|
683
|
-
readonly permission: null;
|
|
684
|
-
readonly sensitive: false;
|
|
685
|
-
readonly mountedWhen: null;
|
|
686
|
-
readonly request: "PaymentMethodSetupParams";
|
|
699
|
+
readonly request: "UpdatePaymentMethodParams";
|
|
687
700
|
readonly responses: {
|
|
688
|
-
readonly 200: "
|
|
701
|
+
readonly 200: "PaymentMethod";
|
|
689
702
|
};
|
|
690
|
-
readonly errors: readonly ["
|
|
703
|
+
readonly errors: readonly ["card_requires_https", "invalid_param", "payment_method_not_usable", "payment_method_update_unsupported", "payment_provider_rejected", "provider_outcome_unknown", "resource_not_found", "service_unavailable"];
|
|
691
704
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
692
705
|
}, {
|
|
693
|
-
readonly method: "
|
|
694
|
-
readonly path: "/v1/me/payment-
|
|
706
|
+
readonly method: "DELETE";
|
|
707
|
+
readonly path: "/v1/me/payment-methods/{id}";
|
|
695
708
|
readonly group: "customer";
|
|
696
709
|
readonly auth: "customer";
|
|
697
710
|
readonly permission: null;
|
|
@@ -699,13 +712,14 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
699
712
|
readonly mountedWhen: null;
|
|
700
713
|
readonly request: null;
|
|
701
714
|
readonly responses: {
|
|
702
|
-
readonly
|
|
715
|
+
readonly 202: null;
|
|
716
|
+
readonly 204: null;
|
|
703
717
|
};
|
|
704
|
-
readonly errors: readonly ["
|
|
718
|
+
readonly errors: readonly ["invalid_param", "payment_method_delete_failed", "payment_method_delete_unsupported", "rate_limit_exceeded", "resource_conflict", "resource_not_found", "service_unavailable"];
|
|
705
719
|
readonly errorSets: readonly ["tier:customer"];
|
|
706
720
|
}, {
|
|
707
721
|
readonly method: "POST";
|
|
708
|
-
readonly path: "/v1/me/payment-
|
|
722
|
+
readonly path: "/v1/me/payment-methods/{id}/confirm";
|
|
709
723
|
readonly group: "customer";
|
|
710
724
|
readonly auth: "customer";
|
|
711
725
|
readonly permission: null;
|
|
@@ -713,13 +727,13 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
713
727
|
readonly mountedWhen: null;
|
|
714
728
|
readonly request: null;
|
|
715
729
|
readonly responses: {
|
|
716
|
-
readonly 200: "
|
|
730
|
+
readonly 200: "PaymentMethod";
|
|
717
731
|
};
|
|
718
|
-
readonly errors: readonly ["
|
|
732
|
+
readonly errors: readonly ["card_declined", "payment_provider_rejected", "resource_not_found", "service_unavailable"];
|
|
719
733
|
readonly errorSets: readonly ["tier:customer"];
|
|
720
734
|
}, {
|
|
721
735
|
readonly method: "POST";
|
|
722
|
-
readonly path: "/v1/me/billing-portal";
|
|
736
|
+
readonly path: "/v1/me/stripe/billing-portal-sessions";
|
|
723
737
|
readonly group: "customer";
|
|
724
738
|
readonly auth: "customer";
|
|
725
739
|
readonly permission: null;
|
|
@@ -727,9 +741,9 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
727
741
|
readonly mountedWhen: "stripe_portal";
|
|
728
742
|
readonly request: null;
|
|
729
743
|
readonly responses: {
|
|
730
|
-
readonly 200: "
|
|
744
|
+
readonly 200: "StripePortalSession";
|
|
731
745
|
};
|
|
732
|
-
readonly errors: readonly ["invalid_param", "resource_not_found"];
|
|
746
|
+
readonly errors: readonly ["invalid_param", "resource_not_found", "route_not_found"];
|
|
733
747
|
readonly errorSets: readonly ["tier:customer"];
|
|
734
748
|
}, {
|
|
735
749
|
readonly method: "GET";
|
|
@@ -759,6 +773,35 @@ export declare const OPENRAILS_ROUTES: readonly [{
|
|
|
759
773
|
};
|
|
760
774
|
readonly errors: readonly ["invalid_param"];
|
|
761
775
|
readonly errorSets: readonly ["tier:customer", "request"];
|
|
776
|
+
}, {
|
|
777
|
+
readonly method: "POST";
|
|
778
|
+
readonly path: "/v1/me/network-link/challenges";
|
|
779
|
+
readonly group: "customer";
|
|
780
|
+
readonly auth: "customer";
|
|
781
|
+
readonly permission: null;
|
|
782
|
+
readonly sensitive: false;
|
|
783
|
+
readonly mountedWhen: "customer_network";
|
|
784
|
+
readonly request: null;
|
|
785
|
+
readonly responses: {
|
|
786
|
+
readonly 201: "NetworkLinkChallenge";
|
|
787
|
+
};
|
|
788
|
+
readonly errors: readonly ["service_unavailable"];
|
|
789
|
+
readonly errorSets: readonly ["tier:customer"];
|
|
790
|
+
}, {
|
|
791
|
+
readonly method: "POST";
|
|
792
|
+
readonly path: "/v1/me/network-link";
|
|
793
|
+
readonly group: "customer";
|
|
794
|
+
readonly auth: "customer";
|
|
795
|
+
readonly permission: null;
|
|
796
|
+
readonly sensitive: false;
|
|
797
|
+
readonly mountedWhen: "customer_network";
|
|
798
|
+
readonly request: "CreateNetworkLinkParams";
|
|
799
|
+
readonly responses: {
|
|
800
|
+
readonly 200: "CustomerLink";
|
|
801
|
+
readonly 201: "CustomerLink";
|
|
802
|
+
};
|
|
803
|
+
readonly errors: readonly ["network_account_linked", "network_link_challenge_invalid", "network_link_conflict", "network_terms_required", "service_unavailable"];
|
|
804
|
+
readonly errorSets: readonly ["tier:customer", "request"];
|
|
762
805
|
}];
|
|
763
806
|
export declare const OPENRAILS_ERROR_SETS: Readonly<Record<string, readonly string[]>>;
|
|
764
807
|
export type OpenRailsRouteKey = `${(typeof OPENRAILS_ROUTES)[number]["method"]} ${(typeof OPENRAILS_ROUTES)[number]["path"]}`;
|