@openrails/billing-ui 0.267.0 → 0.268.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 (110) hide show
  1. package/dist/admin/context.d.ts +10 -0
  2. package/dist/admin/lib/api/endpoints.d.ts +6 -1
  3. package/dist/admin/lib/api/index.d.ts +5 -0
  4. package/dist/admin/pages/settings/custody.d.ts +2 -0
  5. package/dist/{admin-attempts-Er03x8r3.js → admin-attempts-BLeeKABa.js} +8 -8
  6. package/dist/{admin-attempts-Er03x8r3.js.map → admin-attempts-BLeeKABa.js.map} +1 -1
  7. package/dist/{admin-auth-B0lzGq-I.js → admin-auth-DWVWxDup.js} +2 -2
  8. package/dist/{admin-auth-B0lzGq-I.js.map → admin-auth-DWVWxDup.js.map} +1 -1
  9. package/dist/{admin-badge-D9bk3V0z.js → admin-badge-CrEqD9Ew.js} +2 -2
  10. package/dist/{admin-badge-D9bk3V0z.js.map → admin-badge-CrEqD9Ew.js.map} +1 -1
  11. package/dist/{admin-button-UgWgU33l.js → admin-button-a7bDFgp0.js} +2 -2
  12. package/dist/{admin-button-UgWgU33l.js.map → admin-button-a7bDFgp0.js.map} +1 -1
  13. package/dist/{admin-capabilities-6ztIoqOe.js → admin-capabilities-QYUuJXvG.js} +2 -2
  14. package/dist/{admin-capabilities-6ztIoqOe.js.map → admin-capabilities-QYUuJXvG.js.map} +1 -1
  15. package/dist/{admin-card-T3w9wVwC.js → admin-card-D1tz8Lbh.js} +2 -2
  16. package/dist/{admin-card-T3w9wVwC.js.map → admin-card-D1tz8Lbh.js.map} +1 -1
  17. package/dist/{admin-catalog-BBMTQ4IE.js → admin-catalog-ggiDgWsR.js} +18 -18
  18. package/dist/{admin-catalog-BBMTQ4IE.js.map → admin-catalog-ggiDgWsR.js.map} +1 -1
  19. package/dist/{admin-customers-Cj9lIBFF.js → admin-customers-BVMg-gUv.js} +6 -6
  20. package/dist/{admin-customers-Cj9lIBFF.js.map → admin-customers-BVMg-gUv.js.map} +1 -1
  21. package/dist/{admin-dashboard-rDXWPRMx.js → admin-dashboard-Cc13i8i9.js} +14 -14
  22. package/dist/{admin-dashboard-rDXWPRMx.js.map → admin-dashboard-Cc13i8i9.js.map} +1 -1
  23. package/dist/{admin-data-table-tMoCx6BU.js → admin-data-table-BL84xKKF.js} +6 -6
  24. package/dist/{admin-data-table-tMoCx6BU.js.map → admin-data-table-BL84xKKF.js.map} +1 -1
  25. package/dist/{admin-detail-5tgzwBSQ.js → admin-detail-9YAep3ts.js} +460 -441
  26. package/dist/admin-detail-9YAep3ts.js.map +1 -0
  27. package/dist/{admin-detail-C_A8x02G.js → admin-detail-C8t5jBps.js} +11 -11
  28. package/dist/{admin-detail-C_A8x02G.js.map → admin-detail-C8t5jBps.js.map} +1 -1
  29. package/dist/{admin-detail-C4rto5hb.js → admin-detail-CaEwBdX9.js} +12 -12
  30. package/dist/{admin-detail-C4rto5hb.js.map → admin-detail-CaEwBdX9.js.map} +1 -1
  31. package/dist/{admin-detail-Cy4epidT.js → admin-detail-D2zcz_Xm.js} +15 -15
  32. package/dist/{admin-detail-Cy4epidT.js.map → admin-detail-D2zcz_Xm.js.map} +1 -1
  33. package/dist/{admin-dialog-DSB8NTS8.js → admin-dialog-CiAw5vx-.js} +3 -3
  34. package/dist/{admin-dialog-DSB8NTS8.js.map → admin-dialog-CiAw5vx-.js.map} +1 -1
  35. package/dist/{admin-dom-swaG6h-Z.js → admin-dom-VkcwevWr.js} +4 -4
  36. package/dist/{admin-dom-swaG6h-Z.js.map → admin-dom-VkcwevWr.js.map} +1 -1
  37. package/dist/{admin-dropdown-menu-BiJgFZEK.js → admin-dropdown-menu-CYJbmqK2.js} +2 -2
  38. package/dist/{admin-dropdown-menu-BiJgFZEK.js.map → admin-dropdown-menu-CYJbmqK2.js.map} +1 -1
  39. package/dist/{admin-fact-card-DOmtzhDS.js → admin-fact-card-BHTpDlaX.js} +2 -2
  40. package/dist/{admin-fact-card-DOmtzhDS.js.map → admin-fact-card-BHTpDlaX.js.map} +1 -1
  41. package/dist/{admin-health-Cb_vCGip.js → admin-health-BUnjbvYR.js} +9 -9
  42. package/dist/{admin-health-Cb_vCGip.js.map → admin-health-BUnjbvYR.js.map} +1 -1
  43. package/dist/{admin-input-B6FrJxfC.js → admin-input-C-S_RGGo.js} +2 -2
  44. package/dist/{admin-input-B6FrJxfC.js.map → admin-input-C-S_RGGo.js.map} +1 -1
  45. package/dist/{admin-label-BYiPss0j.js → admin-label-DPVYDdSO.js} +2 -2
  46. package/dist/{admin-label-BYiPss0j.js.map → admin-label-DPVYDdSO.js.map} +1 -1
  47. package/dist/{admin-linked-table-row-g5Q4eMOC.js → admin-linked-table-row-D-gbTT7a.js} +4 -4
  48. package/dist/{admin-linked-table-row-g5Q4eMOC.js.map → admin-linked-table-row-D-gbTT7a.js.map} +1 -1
  49. package/dist/{admin-metering-BznnYhgX.js → admin-metering-BjbL0jjT.js} +14 -14
  50. package/dist/{admin-metering-BznnYhgX.js.map → admin-metering-BjbL0jjT.js.map} +1 -1
  51. package/dist/{admin-ops-DOCIYTjD.js → admin-ops-DT8epiXg.js} +11 -11
  52. package/dist/{admin-ops-DOCIYTjD.js.map → admin-ops-DT8epiXg.js.map} +1 -1
  53. package/dist/{admin-orders-DYbdiO07.js → admin-orders-BVW9-Fs9.js} +8 -8
  54. package/dist/{admin-orders-DYbdiO07.js.map → admin-orders-BVW9-Fs9.js.map} +1 -1
  55. package/dist/{admin-payments-DQgZR7J5.js → admin-payments-C5MsFFmm.js} +9 -9
  56. package/dist/{admin-payments-DQgZR7J5.js.map → admin-payments-C5MsFFmm.js.map} +1 -1
  57. package/dist/{admin-price-detail-BvUo5pVr.js → admin-price-detail-D517JYHB.js} +9 -9
  58. package/dist/{admin-price-detail-BvUo5pVr.js.map → admin-price-detail-D517JYHB.js.map} +1 -1
  59. package/dist/{admin-price-wizard-D8c-vvzV.js → admin-price-wizard-bj36o3ux.js} +7 -7
  60. package/dist/{admin-price-wizard-D8c-vvzV.js.map → admin-price-wizard-bj36o3ux.js.map} +1 -1
  61. package/dist/{admin-range-picker-C2lZ51RS.js → admin-range-picker-D2aFF8IV.js} +5 -5
  62. package/dist/{admin-range-picker-C2lZ51RS.js.map → admin-range-picker-D2aFF8IV.js.map} +1 -1
  63. package/dist/{admin-reports-CYwfX2qK.js → admin-reports-D-ob04d4.js} +8 -8
  64. package/dist/{admin-reports-CYwfX2qK.js.map → admin-reports-D-ob04d4.js.map} +1 -1
  65. package/dist/{admin-select-OMB6gB61.js → admin-select-C8O7nx72.js} +2 -2
  66. package/dist/{admin-select-OMB6gB61.js.map → admin-select-C8O7nx72.js.map} +1 -1
  67. package/dist/{admin-settings-Bw49HU8g.js → admin-settings-Bs6cLcqi.js} +374 -98
  68. package/dist/admin-settings-Bs6cLcqi.js.map +1 -0
  69. package/dist/{admin-skeleton-DeY6aCVy.js → admin-skeleton-wfocg2PJ.js} +2 -2
  70. package/dist/{admin-skeleton-DeY6aCVy.js.map → admin-skeleton-wfocg2PJ.js.map} +1 -1
  71. package/dist/{admin-status-badge-DENiR55N.js → admin-status-badge-D_gDMrht.js} +2 -2
  72. package/dist/{admin-status-badge-DENiR55N.js.map → admin-status-badge-D_gDMrht.js.map} +1 -1
  73. package/dist/{admin-subscriptions-BU3WGg3F.js → admin-subscriptions-DYR1RGMO.js} +9 -9
  74. package/dist/{admin-subscriptions-BU3WGg3F.js.map → admin-subscriptions-DYR1RGMO.js.map} +1 -1
  75. package/dist/{admin-switch-DLdWpESJ.js → admin-switch-F5D0AYjT.js} +2 -2
  76. package/dist/{admin-switch-DLdWpESJ.js.map → admin-switch-F5D0AYjT.js.map} +1 -1
  77. package/dist/{admin-table-BRh16qQu.js → admin-table-nUij5fLc.js} +2 -2
  78. package/dist/{admin-table-BRh16qQu.js.map → admin-table-nUij5fLc.js.map} +1 -1
  79. package/dist/{admin-tabs-BXJWVtU7.js → admin-tabs-C3myjKdr.js} +2 -2
  80. package/dist/{admin-tabs-BXJWVtU7.js.map → admin-tabs-C3myjKdr.js.map} +1 -1
  81. package/dist/{admin-textarea-Dv8Ob7H2.js → admin-textarea-v-L-PXIc.js} +2 -2
  82. package/dist/{admin-textarea-Dv8Ob7H2.js.map → admin-textarea-v-L-PXIc.js.map} +1 -1
  83. package/dist/{admin-typed-confirm-dialog-D0R5nKD0.js → admin-typed-confirm-dialog-BLgpuikW.js} +6 -6
  84. package/dist/{admin-typed-confirm-dialog-D0R5nKD0.js.map → admin-typed-confirm-dialog-BLgpuikW.js.map} +1 -1
  85. package/dist/{admin-utils-BE_Zb14A.js → admin-utils-6yE4YIVI.js} +22 -16
  86. package/dist/admin-utils-6yE4YIVI.js.map +1 -0
  87. package/dist/{admin-widget-viz-BvejlYLH.js → admin-widget-viz-BiEfckd4.js} +3 -3
  88. package/dist/{admin-widget-viz-BvejlYLH.js.map → admin-widget-viz-BiEfckd4.js.map} +1 -1
  89. package/dist/admin.css +1 -1
  90. package/dist/admin.js +30 -30
  91. package/dist/admin.js.map +1 -1
  92. package/dist/client/client.d.ts +4 -14
  93. package/dist/client/generated/error-codes.d.ts +1 -1
  94. package/dist/client/generated/routes.d.ts +82 -270
  95. package/dist/client/generated/wire.d.ts +30 -38
  96. package/dist/client/index.d.ts +1 -1
  97. package/dist/client/types.d.ts +13 -22
  98. package/dist/{client-BzxvN5zw.js → client-BYgnI6_h.js} +59 -76
  99. package/dist/client-BYgnI6_h.js.map +1 -0
  100. package/dist/client.js +1 -1
  101. package/dist/{hooks-Cc95yC4f.js → hooks-t2tSrCpa.js} +2 -2
  102. package/dist/{hooks-Cc95yC4f.js.map → hooks-t2tSrCpa.js.map} +1 -1
  103. package/dist/index.js +3 -3
  104. package/dist/react.js +1 -1
  105. package/dist/styles.css +1 -1
  106. package/package.json +1 -1
  107. package/dist/admin-detail-5tgzwBSQ.js.map +0 -1
  108. package/dist/admin-settings-Bw49HU8g.js.map +0 -1
  109. package/dist/admin-utils-BE_Zb14A.js.map +0 -1
  110. package/dist/client-BzxvN5zw.js.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { BillingError } from './errors';
2
- import { Account, CustomerConfig, CustomerEntitlement, CustomerLink, LowBalanceLine, NetworkLinkChallenge, PublicConfig, CurrencyScales, ListPage, NewCard, CardCaptureReference, NextAction, Cart, Order, OrderPaymentInput, Payment, PaymentMethod, Subscription, SubscriptionChange, SubscriptionChangeOption, SubscriptionChangePreview, Usage } from './types';
2
+ import { Account, CustomerConfig, CustomerEntitlement, LowBalanceLine, PublicConfig, CurrencyScales, ListPage, NewCard, CardCaptureReference, NextAction, Cart, Order, OrderPaymentAttempt, OrderPaymentInput, Payment, PaymentMethod, Subscription, SubscriptionChange, SubscriptionChangeOption, SubscriptionChangePreview, Usage } from './types';
3
3
  import type * as wire from "./generated/wire";
4
4
  export interface BillingClientOptions {
5
5
  /** OpenRails embedded mount. Default "/billing/v1". */
@@ -192,6 +192,9 @@ export declare function createBillingClient(options?: BillingClientOptions): {
192
192
  }): Promise<ListPage<Order>>;
193
193
  /** One of the customer's orders: the resumable handle of a purchase. */
194
194
  getOrder(orderId: string, signal?: AbortSignal): Promise<Order>;
195
+ /** Read the exact original payOrder key, without retrying payment. This
196
+ * does not look up createOrder payment keys or renewal/usage collections. */
197
+ getOrderPaymentAttempt(orderId: string, idempotencyKey: string, signal?: AbortSignal): Promise<OrderPaymentAttempt>;
195
198
  /**
196
199
  * Pays an open order. A failed payment resolves with the order (open,
197
200
  * `payment.last_payment_error` saying why) and `error`, the 402.
@@ -262,19 +265,6 @@ export declare function createBillingClient(options?: BillingClientOptions): {
262
265
  * first. Pass the answer's `next_cursor` as `cursor` for the next page.
263
266
  */
264
267
  getUsage(opts: UsageOptions): Promise<Usage>;
265
- /**
266
- * A challenge to link the customer to an openrails.dev account: its
267
- * `nonce` goes in the network sign-in's authorization request.
268
- */
269
- createNetworkLinkChallenge(): Promise<NetworkLinkChallenge>;
270
- /**
271
- * Links the customer to the openrails.dev account whose fresh sign-in
272
- * answered the challenge (its ID token).
273
- */
274
- createNetworkLink(params: {
275
- challengeId: string;
276
- idToken: string;
277
- }): Promise<CustomerLink>;
278
268
  /**
279
269
  * The deployment's configuration, a public read: what the mount serves,
280
270
  * the currency registry and the captcha. React components share one
@@ -1,4 +1,4 @@
1
- export type OpenRailsErrorCode = "admission_captured" | "admission_not_found" | "already_owned" | "application_required" | "as_of_required" | "authentication_required" | "authentication_unavailable" | "authorization_unavailable" | "billing_archive_integrity" | "billing_archive_invalid_artifact" | "billing_archive_merchant_mismatch" | "billing_archive_not_empty" | "billing_archive_platform_cards" | "billing_archive_unavailable" | "billing_archive_unsupported_state" | "billing_policy_not_found" | "cancel_unsupported_on_rail" | "captcha_invalid" | "captcha_required" | "card_attempts_blocked" | "card_declined" | "card_not_saved" | "card_requires_https" | "card_vault_unknown" | "catalog_benefit_overlap" | "catalog_revision_conflict" | "charge_psp_incompatible" | "charge_psp_unknown" | "credential_expired" | "credential_revoked" | "credit_grant_held" | "credit_grant_not_found" | "credit_grant_unavailable" | "csrf_origin_denied" | "currency_unsupported" | "custodian_capture_unavailable" | "customer_action_required" | "customer_email_required" | "customer_issuer_mismatch" | "customer_not_found" | "customer_payment_unsupported" | "customer_session_required" | "customer_tenant_mismatch" | "dashboard_invalid" | "database_busy" | "default_payment_method_invalid" | "default_payment_method_required" | "default_rate_card_not_found" | "destructive_actions_held" | "embed_origins_required" | "entitlement_required" | "event_cursor_expired" | "finding_action_failed" | "finding_not_actionable" | "finding_requires_merchant_config" | "hold_not_found" | "host_event_not_found" | "host_principal_invalid" | "idempotency_key_in_use" | "idempotency_key_required" | "idempotency_key_reused" | "insufficient_credits" | "insufficient_funds" | "internal_error" | "invalid_cursor" | "invalid_customer_id" | "invalid_param" | "invalid_payment_method" | "invalid_psp_reference" | "invalid_query" | "invalid_request_body" | "invalid_settlement_status_request" | "invoker_scoped_principal" | "merchant_config_read_only" | "merchant_mismatch" | "merchant_unresolved" | "meter_in_use" | "meter_rate_card_conflict" | "method_not_allowed" | "metrics_query_invalid" | "model_unavailable" | "network_account_linked" | "network_link_challenge_invalid" | "network_link_conflict" | "network_link_in_use" | "network_terms_required" | "order_action_not_allowed" | "order_attempt_closed" | "order_attempt_expired" | "order_has_recurring_line" | "order_line_unavailable" | "order_not_cancelable" | "order_not_payable" | "order_payment_in_progress" | "order_total_changed" | "pay_url_attempts_exhausted" | "pay_url_expired" | "pay_url_not_found" | "pay_url_unavailable" | "payment_duplicate_refused" | "payment_exceeds_due" | "payment_failed" | "payment_idempotency_conflict" | "payment_in_progress" | "payment_method_delete_failed" | "payment_method_delete_unsupported" | "payment_method_not_psp_vaulted" | "payment_method_not_usable" | "payment_method_psp_mismatch" | "payment_method_required" | "payment_method_same_vault" | "payment_method_stale" | "payment_method_update_failed" | "payment_method_update_unsupported" | "payment_not_found" | "payment_not_refundable" | "payment_not_retryable" | "payment_option_unavailable" | "payment_provider_rejected" | "permission_required" | "platform_vault_mixed_class" | "platform_vault_unavailable" | "platform_vault_unreachable" | "price_change_currency_mismatch" | "price_change_target_archived" | "price_increase_notice_too_short" | "price_key_cadence_conflict" | "price_key_not_found" | "price_migration_not_found" | "price_not_found" | "price_not_sellable" | "product_in_use" | "product_not_found" | "product_tier_group_conflict" | "product_tier_group_in_use" | "provider_cancel_held" | "provider_outcome_unknown" | "provider_price_unreadable" | "provider_writes_disabled" | "provider_writes_held" | "psp_claim_requires_proof" | "psp_credentials_rejected" | "psp_environment_refused" | "psp_exists" | "psp_key_taken" | "psp_last_active" | "psp_not_found" | "purchase_review_resolved" | "quantity_not_allowed" | "rate_card_product_not_found" | "rate_limit_exceeded" | "rebill_terms_committed" | "refund_failed" | "refund_rail_unavailable" | "refund_unsupported" | "request_body_too_large" | "resource_access_denied" | "resource_conflict" | "resource_not_found" | "revision_mismatch" | "route_not_found" | "running_charge_not_found" | "scheduled_change_exists" | "service_credential_customer_scope_denied" | "service_unavailable" | "solana_rpc_unavailable" | "solana_transaction_refused" | "step_up_required" | "step_up_unavailable" | "stored_credential_required" | "subscription_change_already_scheduled" | "subscription_change_cadence_unsupported" | "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" | "subscription_paid_through" | "subscription_resumable" | "trial_unsupported_on_rail" | "unknown_field" | "unsupported_media_type" | "usage_meter_invalid" | "usage_meter_not_found" | "usage_not_priced" | "usage_rate_card_invalid" | "webhook_account_mismatch" | "webhook_invalid";
1
+ export type OpenRailsErrorCode = "admission_captured" | "admission_not_found" | "already_owned" | "application_required" | "as_of_required" | "authentication_required" | "authentication_unavailable" | "authorization_unavailable" | "billing_archive_integrity" | "billing_archive_invalid_artifact" | "billing_archive_merchant_mismatch" | "billing_archive_not_empty" | "billing_archive_platform_cards" | "billing_archive_unavailable" | "billing_archive_unsupported_state" | "billing_policy_not_found" | "cancel_unsupported_on_rail" | "captcha_invalid" | "captcha_required" | "card_attempts_blocked" | "card_declined" | "card_not_saved" | "card_requires_https" | "card_vault_unknown" | "catalog_benefit_overlap" | "catalog_revision_conflict" | "charge_psp_incompatible" | "charge_psp_unknown" | "credential_expired" | "credential_revoked" | "credit_grant_held" | "credit_grant_not_found" | "credit_grant_unavailable" | "csrf_origin_denied" | "currency_unsupported" | "custodian_capture_unavailable" | "customer_action_required" | "customer_email_required" | "customer_issuer_mismatch" | "customer_not_found" | "customer_payment_unsupported" | "customer_session_required" | "customer_tenant_mismatch" | "dashboard_invalid" | "database_busy" | "default_payment_method_invalid" | "default_payment_method_required" | "default_rate_card_not_found" | "destructive_actions_held" | "embed_origins_required" | "entitlement_required" | "event_cursor_expired" | "finding_action_failed" | "finding_not_actionable" | "finding_requires_merchant_config" | "hold_not_found" | "host_event_not_found" | "host_principal_invalid" | "idempotency_key_in_use" | "idempotency_key_required" | "idempotency_key_reused" | "insufficient_credits" | "insufficient_funds" | "internal_error" | "invalid_cursor" | "invalid_customer_id" | "invalid_param" | "invalid_payment_method" | "invalid_psp_reference" | "invalid_query" | "invalid_request_body" | "invalid_settlement_status_request" | "invoker_scoped_principal" | "merchant_config_read_only" | "merchant_mismatch" | "merchant_unresolved" | "meter_in_use" | "meter_rate_card_conflict" | "method_not_allowed" | "metrics_query_invalid" | "model_unavailable" | "order_action_not_allowed" | "order_attempt_closed" | "order_attempt_expired" | "order_has_recurring_line" | "order_line_unavailable" | "order_not_cancelable" | "order_not_payable" | "order_payment_in_progress" | "order_total_changed" | "pay_url_attempts_exhausted" | "pay_url_expired" | "pay_url_not_found" | "pay_url_unavailable" | "payment_duplicate_refused" | "payment_exceeds_due" | "payment_failed" | "payment_idempotency_conflict" | "payment_in_progress" | "payment_method_delete_failed" | "payment_method_delete_unsupported" | "payment_method_not_psp_vaulted" | "payment_method_not_usable" | "payment_method_psp_mismatch" | "payment_method_required" | "payment_method_same_vault" | "payment_method_stale" | "payment_method_update_failed" | "payment_method_update_unsupported" | "payment_not_found" | "payment_not_refundable" | "payment_not_retryable" | "payment_option_unavailable" | "payment_provider_rejected" | "permission_required" | "platform_vault_mixed_class" | "platform_vault_unavailable" | "platform_vault_unreachable" | "price_change_currency_mismatch" | "price_change_target_archived" | "price_increase_notice_too_short" | "price_key_cadence_conflict" | "price_key_not_found" | "price_migration_not_found" | "price_not_found" | "price_not_sellable" | "product_in_use" | "product_not_found" | "product_tier_group_conflict" | "product_tier_group_in_use" | "provider_cancel_held" | "provider_outcome_unknown" | "provider_price_unreadable" | "provider_writes_disabled" | "provider_writes_held" | "psp_claim_requires_proof" | "psp_credentials_rejected" | "psp_environment_refused" | "psp_exists" | "psp_key_taken" | "psp_last_active" | "psp_not_found" | "purchase_review_resolved" | "quantity_not_allowed" | "rate_card_product_not_found" | "rate_limit_exceeded" | "rebill_terms_committed" | "refund_failed" | "refund_rail_unavailable" | "refund_unsupported" | "request_body_too_large" | "resource_access_denied" | "resource_conflict" | "resource_not_found" | "revision_mismatch" | "route_not_found" | "running_charge_not_found" | "scheduled_change_exists" | "service_credential_customer_scope_denied" | "service_unavailable" | "solana_rpc_unavailable" | "solana_transaction_refused" | "step_up_required" | "step_up_unavailable" | "stored_credential_required" | "subscription_change_already_scheduled" | "subscription_change_cadence_unsupported" | "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" | "subscription_paid_through" | "subscription_resumable" | "trial_unsupported_on_rail" | "unknown_field" | "unsupported_media_type" | "usage_meter_invalid" | "usage_meter_not_found" | "usage_not_priced" | "usage_rate_card_invalid" | "webhook_account_mismatch" | "webhook_invalid";
2
2
  export type OpenRailsErrorType = "api_error" | "authentication_error" | "authorization_error" | "card_error" | "invalid_request_error" | "rate_limit_error";
3
3
  export declare const OPENRAILS_ERROR_CODES: Readonly<Record<OpenRailsErrorCode, {
4
4
  status: number;
@@ -128,6 +128,20 @@ export declare const OPENRAILS_ROUTES: readonly [{
128
128
  };
129
129
  readonly errors: readonly ["resource_not_found", "service_unavailable"];
130
130
  readonly errorSets: readonly ["tier:customer"];
131
+ }, {
132
+ readonly method: "GET";
133
+ readonly path: "/v1/me/orders/{id}/payment-attempt";
134
+ readonly group: "customer";
135
+ readonly auth: "customer";
136
+ readonly permission: null;
137
+ readonly sensitive: false;
138
+ readonly mountedWhen: null;
139
+ readonly request: null;
140
+ readonly responses: {
141
+ readonly 200: "OrderPaymentAttempt";
142
+ };
143
+ readonly errors: readonly ["idempotency_key_required", "invalid_param", "resource_not_found", "service_unavailable"];
144
+ readonly errorSets: readonly ["tier:customer"];
131
145
  }, {
132
146
  readonly method: "POST";
133
147
  readonly path: "/v1/me/orders/{id}/pay";
@@ -229,6 +243,23 @@ export declare const OPENRAILS_ROUTES: readonly [{
229
243
  };
230
244
  readonly errors: readonly ["already_owned", "invalid_param", "order_line_unavailable", "quantity_not_allowed", "resource_not_found", "service_unavailable"];
231
245
  readonly errorSets: readonly ["tier:application", "request"];
246
+ }, {
247
+ readonly method: "GET";
248
+ readonly path: "/v1/app/orders/{id}/payment-attempt";
249
+ readonly group: "app";
250
+ readonly auth: "application";
251
+ readonly permission: {
252
+ readonly merchant: "merchant:orders:manage";
253
+ readonly root: "root:orders:manage";
254
+ };
255
+ readonly sensitive: false;
256
+ readonly mountedWhen: null;
257
+ readonly request: null;
258
+ readonly responses: {
259
+ readonly 200: "OrderPaymentAttempt";
260
+ };
261
+ readonly errors: readonly ["idempotency_key_required", "invalid_param", "resource_not_found", "service_unavailable"];
262
+ readonly errorSets: readonly ["tier:application"];
232
263
  }, {
233
264
  readonly method: "POST";
234
265
  readonly path: "/v1/app/orders";
@@ -1743,6 +1774,23 @@ export declare const OPENRAILS_ROUTES: readonly [{
1743
1774
  };
1744
1775
  readonly errors: readonly ["invalid_cursor", "invalid_param"];
1745
1776
  readonly errorSets: readonly ["tier:merchant", "request"];
1777
+ }, {
1778
+ readonly method: "DELETE";
1779
+ readonly path: "/v1/admin/customers/{customer_id}/payment-methods/{id}";
1780
+ readonly group: "admin";
1781
+ readonly auth: "merchant";
1782
+ readonly permission: {
1783
+ readonly merchant: "merchant:customer:manage";
1784
+ readonly root: "root:customer:manage";
1785
+ };
1786
+ readonly sensitive: false;
1787
+ readonly mountedWhen: null;
1788
+ readonly request: null;
1789
+ readonly responses: {
1790
+ readonly 204: null;
1791
+ };
1792
+ readonly errors: readonly ["invalid_param", "payment_method_delete_failed", "payment_method_delete_unsupported", "rate_limit_exceeded", "resource_conflict", "resource_not_found", "service_unavailable"];
1793
+ readonly errorSets: readonly ["tier:merchant"];
1746
1794
  }, {
1747
1795
  readonly method: "PUT";
1748
1796
  readonly path: "/v1/me/default-payment-methods/{currency}";
@@ -1869,6 +1917,40 @@ export declare const OPENRAILS_ROUTES: readonly [{
1869
1917
  };
1870
1918
  readonly errors: readonly ["cancel_unsupported_on_rail", "invalid_param", "payment_in_progress", "provider_cancel_held", "resource_not_found", "service_unavailable", "subscription_not_active"];
1871
1919
  readonly errorSets: readonly ["tier:customer"];
1920
+ }, {
1921
+ readonly method: "PUT";
1922
+ readonly path: "/v1/merchant/custodians/{key}";
1923
+ readonly group: "merchant_config";
1924
+ readonly auth: "merchant";
1925
+ readonly permission: {
1926
+ readonly merchant: "merchant:config:manage";
1927
+ readonly root: "root:config:manage";
1928
+ };
1929
+ readonly sensitive: false;
1930
+ readonly mountedWhen: "merchant_config_edits";
1931
+ readonly request: "PutCustodianParams";
1932
+ readonly responses: {
1933
+ readonly 200: "Custodian";
1934
+ };
1935
+ readonly errors: readonly ["invalid_param", "resource_conflict", "revision_mismatch", "service_unavailable"];
1936
+ readonly errorSets: readonly ["tier:merchant", "request"];
1937
+ }, {
1938
+ readonly method: "GET";
1939
+ readonly path: "/v1/merchant/custodians";
1940
+ readonly group: "merchant_config";
1941
+ readonly auth: "merchant";
1942
+ readonly permission: {
1943
+ readonly merchant: "merchant:config:read";
1944
+ readonly root: "root:config:read";
1945
+ };
1946
+ readonly sensitive: false;
1947
+ readonly mountedWhen: null;
1948
+ readonly request: null;
1949
+ readonly responses: {
1950
+ readonly 200: "ListPage<Custodian>";
1951
+ };
1952
+ readonly errors: readonly ["service_unavailable"];
1953
+ readonly errorSets: readonly ["tier:merchant"];
1872
1954
  }, {
1873
1955
  readonly method: "GET";
1874
1956
  readonly path: "/v1/merchant/psps";
@@ -2526,276 +2608,6 @@ export declare const OPENRAILS_ROUTES: readonly [{
2526
2608
  };
2527
2609
  readonly errors: readonly ["invalid_param", "resource_not_found"];
2528
2610
  readonly errorSets: readonly ["tier:merchant"];
2529
- }, {
2530
- readonly method: "POST";
2531
- readonly path: "/v1/me/network-link/challenges";
2532
- readonly group: "customer";
2533
- readonly auth: "customer";
2534
- readonly permission: null;
2535
- readonly sensitive: false;
2536
- readonly mountedWhen: "customer_network";
2537
- readonly request: null;
2538
- readonly responses: {
2539
- readonly 201: "NetworkLinkChallenge";
2540
- };
2541
- readonly errors: readonly ["service_unavailable"];
2542
- readonly errorSets: readonly ["tier:customer"];
2543
- }, {
2544
- readonly method: "POST";
2545
- readonly path: "/v1/me/network-link";
2546
- readonly group: "customer";
2547
- readonly auth: "customer";
2548
- readonly permission: null;
2549
- readonly sensitive: false;
2550
- readonly mountedWhen: "customer_network";
2551
- readonly request: "CreateNetworkLinkParams";
2552
- readonly responses: {
2553
- readonly 200: "CustomerLink";
2554
- readonly 201: "CustomerLink";
2555
- };
2556
- readonly errors: readonly ["network_account_linked", "network_link_challenge_invalid", "network_link_conflict", "network_terms_required", "service_unavailable"];
2557
- readonly errorSets: readonly ["tier:customer", "request"];
2558
- }, {
2559
- readonly method: "GET";
2560
- readonly path: "/v1/app/customers";
2561
- readonly group: "app";
2562
- readonly auth: "application";
2563
- readonly permission: {
2564
- readonly merchant: "merchant:customers:read";
2565
- readonly root: "root:customers:read";
2566
- };
2567
- readonly sensitive: false;
2568
- readonly mountedWhen: "customer_network";
2569
- readonly request: null;
2570
- readonly responses: {
2571
- readonly 200: "ListPage<Customer>";
2572
- };
2573
- readonly errors: readonly ["service_unavailable"];
2574
- readonly errorSets: readonly ["tier:application", "request"];
2575
- }, {
2576
- readonly method: "GET";
2577
- readonly path: "/v1/network/links";
2578
- readonly group: "network";
2579
- readonly auth: "network";
2580
- readonly permission: null;
2581
- readonly sensitive: false;
2582
- readonly mountedWhen: "customer_network";
2583
- readonly request: null;
2584
- readonly responses: {
2585
- readonly 200: "ListPage<NetworkLink>";
2586
- };
2587
- readonly errors: readonly ["invalid_cursor", "service_unavailable"];
2588
- readonly errorSets: readonly ["tier:network", "request"];
2589
- }, {
2590
- readonly method: "GET";
2591
- readonly path: "/v1/network/subscriptions";
2592
- readonly group: "network";
2593
- readonly auth: "network";
2594
- readonly permission: null;
2595
- readonly sensitive: false;
2596
- readonly mountedWhen: "customer_network";
2597
- readonly request: null;
2598
- readonly responses: {
2599
- readonly 200: "ListPage<NetworkSubscription>";
2600
- };
2601
- readonly errors: readonly ["invalid_cursor", "service_unavailable"];
2602
- readonly errorSets: readonly ["tier:network", "request"];
2603
- }, {
2604
- readonly method: "GET";
2605
- readonly path: "/v1/network/orders";
2606
- readonly group: "network";
2607
- readonly auth: "network";
2608
- readonly permission: null;
2609
- readonly sensitive: false;
2610
- readonly mountedWhen: "customer_network";
2611
- readonly request: null;
2612
- readonly responses: {
2613
- readonly 200: "ListPage<NetworkOrder>";
2614
- };
2615
- readonly errors: readonly ["invalid_cursor", "service_unavailable"];
2616
- readonly errorSets: readonly ["tier:network", "request"];
2617
- }, {
2618
- readonly method: "DELETE";
2619
- readonly path: "/v1/network/links/{link_id}";
2620
- readonly group: "network";
2621
- readonly auth: "network";
2622
- readonly permission: null;
2623
- readonly sensitive: true;
2624
- readonly mountedWhen: "customer_network";
2625
- readonly request: null;
2626
- readonly responses: {
2627
- readonly 204: null;
2628
- };
2629
- readonly errors: readonly ["invalid_param", "network_link_in_use", "service_unavailable"];
2630
- readonly errorSets: readonly ["tier:network"];
2631
- }, {
2632
- readonly method: "GET";
2633
- readonly path: "/v1/network/links/{link_id}/subscriptions/{id}";
2634
- readonly group: "network";
2635
- readonly auth: "network";
2636
- readonly permission: null;
2637
- readonly sensitive: false;
2638
- readonly mountedWhen: "customer_network";
2639
- readonly request: null;
2640
- readonly responses: {
2641
- readonly 200: "Subscription";
2642
- };
2643
- readonly errors: readonly ["authentication_required", "invalid_param", "resource_not_found", "subscription_not_found"];
2644
- readonly errorSets: readonly ["tier:network"];
2645
- }, {
2646
- readonly method: "POST";
2647
- readonly path: "/v1/network/links/{link_id}/subscriptions/{id}/cancel";
2648
- readonly group: "network";
2649
- readonly auth: "network";
2650
- readonly permission: null;
2651
- readonly sensitive: true;
2652
- readonly mountedWhen: "customer_network";
2653
- readonly request: "CustomerCancelSubscriptionParams";
2654
- readonly responses: {
2655
- readonly 200: "Subscription";
2656
- };
2657
- readonly errors: readonly ["authentication_required", "cancel_unsupported_on_rail", "invalid_param", "payment_in_progress", "provider_cancel_held", "service_unavailable", "solana_rpc_unavailable", "solana_transaction_refused", "subscription_not_active", "subscription_not_found"];
2658
- readonly errorSets: readonly ["tier:network", "request"];
2659
- }, {
2660
- readonly method: "POST";
2661
- readonly path: "/v1/network/links/{link_id}/subscriptions/{id}/resume";
2662
- readonly group: "network";
2663
- readonly auth: "network";
2664
- readonly permission: null;
2665
- readonly sensitive: true;
2666
- readonly mountedWhen: "customer_network";
2667
- readonly request: null;
2668
- readonly responses: {
2669
- readonly 200: "Subscription";
2670
- };
2671
- readonly errors: readonly ["authentication_required", "default_payment_method_required", "invalid_param", "payment_method_stale", "service_unavailable", "solana_rpc_unavailable", "subscription_not_found"];
2672
- readonly errorSets: readonly ["tier:network"];
2673
- }, {
2674
- readonly method: "PUT";
2675
- readonly path: "/v1/network/links/{link_id}/subscriptions/{id}/payment-method";
2676
- readonly group: "network";
2677
- readonly auth: "network";
2678
- readonly permission: null;
2679
- readonly sensitive: true;
2680
- readonly mountedWhen: "customer_network";
2681
- readonly request: "SetSubscriptionPaymentMethodParams";
2682
- readonly responses: {
2683
- readonly 200: "Subscription";
2684
- };
2685
- 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"];
2686
- readonly errorSets: readonly ["tier:network", "request"];
2687
- }, {
2688
- readonly method: "GET";
2689
- readonly path: "/v1/network/links/{link_id}/payment-methods";
2690
- readonly group: "network";
2691
- readonly auth: "network";
2692
- readonly permission: null;
2693
- readonly sensitive: false;
2694
- readonly mountedWhen: "customer_network";
2695
- readonly request: null;
2696
- readonly responses: {
2697
- readonly 200: "ListPage<PaymentMethod>";
2698
- };
2699
- readonly errors: readonly ["invalid_cursor"];
2700
- readonly errorSets: readonly ["tier:network", "request"];
2701
- }, {
2702
- readonly method: "POST";
2703
- readonly path: "/v1/network/links/{link_id}/payment-methods";
2704
- readonly group: "network";
2705
- readonly auth: "network";
2706
- readonly permission: null;
2707
- readonly sensitive: true;
2708
- readonly mountedWhen: "customer_network";
2709
- readonly request: "CreatePaymentMethodParams";
2710
- readonly responses: {
2711
- readonly 201: "PaymentMethod";
2712
- };
2713
- 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", "resource_conflict", "service_unavailable"];
2714
- readonly errorSets: readonly ["tier:network", "request"];
2715
- }, {
2716
- readonly method: "DELETE";
2717
- readonly path: "/v1/network/links/{link_id}/payment-methods/{id}";
2718
- readonly group: "network";
2719
- readonly auth: "network";
2720
- readonly permission: null;
2721
- readonly sensitive: true;
2722
- readonly mountedWhen: "customer_network";
2723
- readonly request: null;
2724
- readonly responses: {
2725
- readonly 204: null;
2726
- };
2727
- readonly errors: readonly ["invalid_param", "payment_method_delete_failed", "payment_method_delete_unsupported", "rate_limit_exceeded", "resource_conflict", "resource_not_found", "service_unavailable"];
2728
- readonly errorSets: readonly ["tier:network"];
2729
- }, {
2730
- readonly method: "GET";
2731
- readonly path: "/v1/network/links/{link_id}/orders/{id}";
2732
- readonly group: "network";
2733
- readonly auth: "network";
2734
- readonly permission: null;
2735
- readonly sensitive: false;
2736
- readonly mountedWhen: "customer_network";
2737
- readonly request: null;
2738
- readonly responses: {
2739
- readonly 200: "Order";
2740
- };
2741
- readonly errors: readonly ["resource_not_found", "service_unavailable"];
2742
- readonly errorSets: readonly ["tier:network"];
2743
- }, {
2744
- readonly method: "POST";
2745
- readonly path: "/v1/network/links/{link_id}/orders/{id}/pay";
2746
- readonly group: "network";
2747
- readonly auth: "network";
2748
- readonly permission: null;
2749
- readonly sensitive: true;
2750
- readonly mountedWhen: "customer_network";
2751
- readonly request: "PayOrderParams";
2752
- readonly responses: {
2753
- readonly 200: "Order";
2754
- };
2755
- readonly errors: readonly ["card_attempts_blocked", "card_declined", "customer_action_required", "customer_email_required", "entitlement_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"];
2756
- readonly errorSets: readonly ["tier:network", "request"];
2757
- }, {
2758
- readonly method: "POST";
2759
- readonly path: "/v1/network/links/{link_id}/orders/{id}/confirm";
2760
- readonly group: "network";
2761
- readonly auth: "network";
2762
- readonly permission: null;
2763
- readonly sensitive: true;
2764
- readonly mountedWhen: "customer_network";
2765
- readonly request: "ConfirmOrderParams";
2766
- readonly responses: {
2767
- readonly 200: "Order";
2768
- };
2769
- readonly errors: readonly ["card_declined", "customer_action_required", "customer_session_required", "invalid_param", "payment_failed", "resource_conflict", "resource_not_found", "service_unavailable"];
2770
- readonly errorSets: readonly ["tier:network", "request"];
2771
- }, {
2772
- readonly method: "GET";
2773
- readonly path: "/v1/network/links/{link_id}/agreements";
2774
- readonly group: "network";
2775
- readonly auth: "network";
2776
- readonly permission: null;
2777
- readonly sensitive: false;
2778
- readonly mountedWhen: "customer_network";
2779
- readonly request: null;
2780
- readonly responses: {
2781
- readonly 200: "ListPage<Agreement>";
2782
- };
2783
- readonly errors: readonly ["invalid_cursor"];
2784
- readonly errorSets: readonly ["tier:network", "request"];
2785
- }, {
2786
- readonly method: "POST";
2787
- readonly path: "/v1/network/links/{link_id}/agreements/{id}/revoke";
2788
- readonly group: "network";
2789
- readonly auth: "network";
2790
- readonly permission: null;
2791
- readonly sensitive: true;
2792
- readonly mountedWhen: "customer_network";
2793
- readonly request: null;
2794
- readonly responses: {
2795
- readonly 200: "AgreementRevocation";
2796
- };
2797
- readonly errors: readonly ["cancel_unsupported_on_rail", "invalid_param", "payment_in_progress", "provider_cancel_held", "resource_not_found", "service_unavailable", "subscription_not_active"];
2798
- readonly errorSets: readonly ["tier:network"];
2799
2611
  }];
2800
2612
  export declare const OPENRAILS_ERROR_SETS: Readonly<Record<string, readonly string[]>>;
2801
2613
  export type OpenRailsRouteKey = `${(typeof OPENRAILS_ROUTES)[number]["method"]} ${(typeof OPENRAILS_ROUTES)[number]["path"]}`;
@@ -455,10 +455,6 @@ export type CreateMyOrderParams = {
455
455
  reusable?: boolean;
456
456
  pay_url?: MyOrderPayURLParams;
457
457
  };
458
- export type CreateNetworkLinkParams = {
459
- challenge_id?: string;
460
- id_token?: string;
461
- };
462
458
  export type CreateOrderParams = {
463
459
  customer_id?: string;
464
460
  lines?: OrderLineParams[];
@@ -475,6 +471,7 @@ export type CreatePSPParams = {
475
471
  key?: string;
476
472
  rail?: "ccbill" | "nmi" | "solana" | "stripe";
477
473
  environment?: string;
474
+ custodian?: string;
478
475
  gateway_id?: string;
479
476
  account_id?: string;
480
477
  client_accnum?: string;
@@ -613,6 +610,16 @@ export type CurrencyUnits = {
613
610
  decimals: number;
614
611
  minor_decimals: number;
615
612
  };
613
+ export type Custodian = {
614
+ key: string;
615
+ kind: string;
616
+ environment: string;
617
+ account_id: string;
618
+ settings: Record<string, unknown> | null;
619
+ credentials: Record<string, PSPCredential> | null;
620
+ archived: boolean;
621
+ revision: number;
622
+ };
616
623
  export type CustodianCaptureReference = {
617
624
  custodian_id?: string;
618
625
  session_id?: string;
@@ -664,17 +671,6 @@ export type CustomerEntitlement = {
664
671
  entitlement: string;
665
672
  quantity: number | null;
666
673
  };
667
- export type CustomerLink = {
668
- id: string;
669
- merchant_id: string;
670
- customer_id: string;
671
- account_id: string;
672
- method: "connect" | "payment_page" | "sign_in";
673
- status: "active" | "revoked";
674
- linked_at: string;
675
- revoked_at: string | null;
676
- revoked_by: "account_deleted" | "customer" | "merchant_left" | null;
677
- };
678
674
  export type CustomerSettings = {
679
675
  usage_billing?: UsageBillingAccount[];
680
676
  credit_limits: CreditLimit[];
@@ -1192,25 +1188,6 @@ export type MetricsSchema = {
1192
1188
  export type MyOrderPayURLParams = {
1193
1189
  embedded?: boolean;
1194
1190
  };
1195
- export type NetworkLink = {
1196
- link: CustomerLink;
1197
- merchant: PublicMerchant;
1198
- };
1199
- export type NetworkLinkChallenge = {
1200
- id: string;
1201
- nonce: string;
1202
- expires_at: string;
1203
- };
1204
- export type NetworkOrder = {
1205
- link_id: string;
1206
- merchant_id: string;
1207
- order: Order;
1208
- };
1209
- export type NetworkSubscription = {
1210
- link_id: string;
1211
- merchant_id: string;
1212
- subscription: Subscription;
1213
- };
1214
1191
  export type NewPriceDraft = {
1215
1192
  product_key: string;
1216
1193
  review_text: string;
@@ -1294,6 +1271,17 @@ export type OrderPayment = {
1294
1271
  payment_method_id: string | null;
1295
1272
  payment_id: string | null;
1296
1273
  };
1274
+ export type OrderPaymentAttempt = {
1275
+ order_id: string;
1276
+ customer_id: string;
1277
+ attempt_id: string;
1278
+ state: string;
1279
+ payment_id?: string;
1280
+ payment_method_id?: string;
1281
+ psp_id: string;
1282
+ amount: string;
1283
+ currency: string;
1284
+ };
1297
1285
  export type OrderPaymentOption = {
1298
1286
  saved_payment_method_ids?: string[];
1299
1287
  psp_id: string;
@@ -1782,7 +1770,6 @@ export type PublicConfig = {
1782
1770
  currencies: CurrencyUnits[];
1783
1771
  rails: RailDefinition[];
1784
1772
  captcha: CaptchaConfig | null;
1785
- network: PublicNetwork | null;
1786
1773
  };
1787
1774
  export type PublicMerchant = {
1788
1775
  display_name: string;
@@ -1793,9 +1780,13 @@ export type PublicMerchant = {
1793
1780
  statement_descriptor: string | null;
1794
1781
  embed_origins: string[];
1795
1782
  };
1796
- export type PublicNetwork = {
1797
- issuer: string;
1798
- client_id: string;
1783
+ export type PutCustodianParams = {
1784
+ expected_revision?: number;
1785
+ kind?: string;
1786
+ environment?: string;
1787
+ account_id?: string;
1788
+ settings?: Record<string, unknown>;
1789
+ credentials?: Record<string, string>;
1799
1790
  };
1800
1791
  export type Quantity = {
1801
1792
  min: number;
@@ -2217,6 +2208,7 @@ export type UpdatePSPParams = {
2217
2208
  tokenization_key?: string;
2218
2209
  publishable_key?: string;
2219
2210
  credentials?: Record<string, string> | null;
2211
+ custodian?: string;
2220
2212
  retire_webhook_overlap?: boolean;
2221
2213
  archived?: boolean;
2222
2214
  allow_last?: boolean;
@@ -1,5 +1,5 @@
1
1
  export { CANCEL_REASON_MAX, CANCEL_REASON_MIN, createBillingClient, isWalletAction, isWalletRejection, RETRY_BUDGET_MS, signWalletAction, WalletRejectedError, type BillingClient, type BillingClientOptions, type ListOptions, type OrderResult, type SendSolanaTransaction, type SubscriptionChangeInput, type UsageOptions, } from './client';
2
2
  export { redeemAssertion, tokenSource, type RedeemAssertionOptions, type TokenResponse, type TokenSource, type TokenSourceOptions, } from './token-source';
3
3
  export { BillingError, isBillingError, isServerError, readBillingError, toBillingError, transportFailure, type BillingErrorBody, } from './errors';
4
- export type { Account, Balance, CaptchaConfig, CardSummary, Cart, Currency, CurrencyScales, CustomerConfig, CustomerEntitlement, CustomerLink, PaymentConfig, PaymentFailure, PublicConfig, PublicMerchant, ListPage, LowBalanceLine, NetworkLinkChallenge, NewCard, CardCaptureReference, NextAction, Order, OrderLine, OrderLineRefusal, OrderPaymentInput, OrderPreviewLine, Page, Payment, PaymentMethod, PaymentRecovery, Price, Product, Subscription, SubscriptionDunning, SubscriptionProduct, SubscriptionStatus, SubscriptionChange, SubscriptionChangeOption, SubscriptionChangePreview, Usage, UsageRow, } from './types';
4
+ export type { Account, Balance, CaptchaConfig, CardSummary, Cart, Currency, CurrencyScales, CustomerConfig, CustomerEntitlement, PaymentConfig, PaymentFailure, PublicConfig, PublicMerchant, ListPage, LowBalanceLine, NewCard, CardCaptureReference, NextAction, Order, OrderPaymentAttempt, OrderLine, OrderLineRefusal, OrderPaymentInput, OrderPreviewLine, Page, Payment, PaymentMethod, PaymentRecovery, Price, Product, Subscription, SubscriptionDunning, SubscriptionProduct, SubscriptionStatus, SubscriptionChange, SubscriptionChangeOption, SubscriptionChangePreview, Usage, UsageRow, } from './types';
5
5
  export { amountToDecimal, decimalToAmount, formatAmount, type Amount, } from '../lib/money';
@@ -519,6 +519,19 @@ export declare const orderSchema: z.ZodObject<{
519
519
  created_at: z.ZodString;
520
520
  }, z.core.$strip>;
521
521
  export type Order = z.infer<typeof orderSchema>;
522
+ /** Exact original /orders/{id}/pay request; reading never executes payment. */
523
+ export declare const orderPaymentAttemptSchema: z.ZodObject<{
524
+ order_id: z.ZodString;
525
+ customer_id: z.ZodString;
526
+ attempt_id: z.ZodString;
527
+ state: z.ZodString;
528
+ payment_id: z.ZodOptional<z.ZodString>;
529
+ payment_method_id: z.ZodOptional<z.ZodString>;
530
+ psp_id: z.ZodString;
531
+ amount: z.ZodString & z.ZodType<string, string, z.core.$ZodTypeInternals<string, string>>;
532
+ currency: z.ZodString;
533
+ }, z.core.$strip>;
534
+ export type OrderPaymentAttempt = z.infer<typeof orderPaymentAttemptSchema>;
522
535
  /** Why a line cannot be bought: `already_owned`, `entitlement_required`, `unavailable`, ... */
523
536
  export declare const orderLineRefusalSchema: z.ZodObject<{
524
537
  code: z.ZodString;
@@ -1122,10 +1135,6 @@ export declare const publicConfigSchema: z.ZodObject<{
1122
1135
  action: z.ZodString;
1123
1136
  token_header: z.ZodString;
1124
1137
  }, z.core.$strip>>>;
1125
- network: z.ZodOptional<z.ZodNullable<z.ZodObject<{
1126
- issuer: z.ZodString;
1127
- client_id: z.ZodString;
1128
- }, z.core.$strip>>>;
1129
1138
  }, z.core.$strip>;
1130
1139
  export type PublicConfig = z.infer<typeof publicConfigSchema>;
1131
1140
  /**
@@ -1208,24 +1217,6 @@ export declare const customerConfigSchema: z.ZodObject<{
1208
1217
  client_country: z.ZodPipe<z.ZodOptional<z.ZodNullable<z.ZodString>>, z.ZodTransform<string, string | null | undefined>>;
1209
1218
  }, z.core.$strip>;
1210
1219
  export type CustomerConfig = z.infer<typeof customerConfigSchema>;
1211
- export declare const networkLinkChallengeSchema: z.ZodObject<{
1212
- id: z.ZodString;
1213
- nonce: z.ZodString;
1214
- expires_at: z.ZodString;
1215
- }, z.core.$strip>;
1216
- export type NetworkLinkChallenge = z.infer<typeof networkLinkChallengeSchema>;
1217
- export declare const customerLinkSchema: z.ZodObject<{
1218
- id: z.ZodString;
1219
- merchant_id: z.ZodString;
1220
- customer_id: z.ZodString;
1221
- account_id: z.ZodString;
1222
- method: z.ZodString;
1223
- status: z.ZodString;
1224
- linked_at: z.ZodString;
1225
- revoked_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1226
- revoked_by: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1227
- }, z.core.$strip>;
1228
- export type CustomerLink = z.infer<typeof customerLinkSchema>;
1229
1220
  /**
1230
1221
  * What a card setup hands the server: tokenized data only, never a PAN.
1231
1222
  * OpenRails reads the saved card's brand, last four and expiry from the PSP.