@openrails/billing-ui 0.282.0 → 0.283.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/README.md +108 -364
- package/dist/account/format.d.ts +5 -1
- package/dist/admin/context.d.ts +38 -46
- package/dist/admin/lib/api/endpoints.d.ts +4 -4
- package/dist/admin/lib/api/index.d.ts +4 -4
- package/dist/admin/lib/api/metrics.d.ts +15 -6
- package/dist/admin/lib/capabilities.d.ts +2 -0
- package/dist/admin/lib/format.d.ts +29 -1
- package/dist/admin/lib/mutations.d.ts +0 -10
- package/dist/admin/lib/queries.d.ts +16 -10
- package/dist/admin/messages.d.ts +61 -20
- package/dist/admin/pages/catalog/price-wizard-logic.d.ts +2 -0
- package/dist/admin/pages/catalog/price-wizard.d.ts +1 -3
- package/dist/admin/pages/customers/credits.d.ts +4 -1
- package/dist/admin/pages/dashboard/levels.d.ts +8 -0
- package/dist/admin/pages/dashboard/lib.d.ts +16 -7
- package/dist/admin/pages/dashboard/programs.d.ts +3 -0
- package/dist/admin/pages/dashboard/query-builder.d.ts +20 -0
- package/dist/admin/pages/dashboard/range.d.ts +8 -2
- package/dist/admin/pages/dashboard/registry.d.ts +14 -0
- package/dist/admin/pages/dashboard/reports-model.d.ts +8 -4
- package/dist/admin/pages/dashboard/reports.d.ts +1 -1
- package/dist/admin/pages/dashboard/units.d.ts +5 -0
- package/dist/admin/pages/dashboard/use-range.d.ts +5 -1
- package/dist/admin/pages/dashboard/widget-editor.d.ts +7 -2
- package/dist/admin/pages/dashboard/widget-tile.d.ts +10 -4
- package/dist/admin/pages/dashboard/widget-viz.d.ts +10 -5
- package/dist/admin/pages/ops/signals.d.ts +4 -0
- package/dist/admin/pages/payments/attempts.d.ts +2 -2
- package/dist/admin/pages/payments/health-model.d.ts +20 -20
- package/dist/admin/pages/subscriptions/views.d.ts +4 -0
- package/dist/admin-attempts-CRkxeVfQ.js +417 -0
- package/dist/admin-attempts-CRkxeVfQ.js.map +1 -0
- package/dist/{admin-auth-CTLBqp7N.js → admin-auth-C0pBH3kp.js} +2 -2
- package/dist/{admin-auth-CTLBqp7N.js.map → admin-auth-C0pBH3kp.js.map} +1 -1
- package/dist/{admin-badge-3zABrSBc.js → admin-badge-C_-j7ANF.js} +2 -2
- package/dist/{admin-badge-3zABrSBc.js.map → admin-badge-C_-j7ANF.js.map} +1 -1
- package/dist/{admin-button-FRNl7_Yf.js → admin-button-BV5MAL2H.js} +2 -2
- package/dist/{admin-button-FRNl7_Yf.js.map → admin-button-BV5MAL2H.js.map} +1 -1
- package/dist/{admin-capabilities-uSi2Pb2h.js → admin-capabilities-B3ZfkA49.js} +21 -13
- package/dist/admin-capabilities-B3ZfkA49.js.map +1 -0
- package/dist/{admin-card-YKPGmx5w.js → admin-card-DQ61c-kV.js} +2 -2
- package/dist/{admin-card-YKPGmx5w.js.map → admin-card-DQ61c-kV.js.map} +1 -1
- package/dist/admin-catalog-DAnsClai.js +867 -0
- package/dist/admin-catalog-DAnsClai.js.map +1 -0
- package/dist/{admin-cursor-pager-BGgOOq7s.js → admin-cursor-pager-dkNj-gb6.js} +22 -22
- package/dist/{admin-cursor-pager-BGgOOq7s.js.map → admin-cursor-pager-dkNj-gb6.js.map} +1 -1
- package/dist/admin-customer-search-DDMn_5Us.js +115 -0
- package/dist/admin-customer-search-DDMn_5Us.js.map +1 -0
- package/dist/{admin-customers-DFQ75ZBi.js → admin-customers-BMaugwpg.js} +24 -25
- package/dist/admin-customers-BMaugwpg.js.map +1 -0
- package/dist/admin-dashboard-DbbfrIOq.js +510 -0
- package/dist/admin-dashboard-DbbfrIOq.js.map +1 -0
- package/dist/{admin-data-table-DyYm4h_Y.js → admin-data-table-BjA8cBsr.js} +5 -5
- package/dist/{admin-data-table-DyYm4h_Y.js.map → admin-data-table-BjA8cBsr.js.map} +1 -1
- package/dist/admin-detail-BVJcnTO-.js +1361 -0
- package/dist/admin-detail-BVJcnTO-.js.map +1 -0
- package/dist/{admin-detail-CG3kLIDS.js → admin-detail-DO9wd12I.js} +130 -107
- package/dist/admin-detail-DO9wd12I.js.map +1 -0
- package/dist/{admin-detail-SLijWf4F.js → admin-detail-M7YFYOGN.js} +211 -210
- package/dist/{admin-detail-SLijWf4F.js.map → admin-detail-M7YFYOGN.js.map} +1 -1
- package/dist/admin-detail-sOLj-K-Y.js +336 -0
- package/dist/{admin-detail-wttCvrxI.js.map → admin-detail-sOLj-K-Y.js.map} +1 -1
- package/dist/admin-detail-uZ-eR2TT.js +292 -0
- package/dist/{admin-detail-BytmF-e3.js.map → admin-detail-uZ-eR2TT.js.map} +1 -1
- package/dist/{admin-dialog-BVx92baz.js → admin-dialog-BxRcYcQM.js} +3 -3
- package/dist/{admin-dialog-BVx92baz.js.map → admin-dialog-BxRcYcQM.js.map} +1 -1
- package/dist/{admin-dropdown-menu-BV7vxYr9.js → admin-dropdown-menu-DlyaKwyU.js} +2 -2
- package/dist/{admin-dropdown-menu-BV7vxYr9.js.map → admin-dropdown-menu-DlyaKwyU.js.map} +1 -1
- package/dist/{admin-dunning-D8lAP7OA.js → admin-dunning-CDy6aMAj.js} +2 -2
- package/dist/{admin-dunning-D8lAP7OA.js.map → admin-dunning-CDy6aMAj.js.map} +1 -1
- package/dist/{admin-fact-card-CTQyFmQY.js → admin-fact-card-2DujC_r3.js} +2 -2
- package/dist/{admin-fact-card-CTQyFmQY.js.map → admin-fact-card-2DujC_r3.js.map} +1 -1
- package/dist/{admin-utils-CuwG3SAt.js → admin-format-Bc4NWK0F.js} +491 -328
- package/dist/admin-format-Bc4NWK0F.js.map +1 -0
- package/dist/{admin-health-DWpONa-7.js → admin-health-DePsyIlc.js} +217 -196
- package/dist/admin-health-DePsyIlc.js.map +1 -0
- package/dist/{admin-imports-Dsd5QmAe.js → admin-imports-BrQH3u9M.js} +85 -86
- package/dist/{admin-imports-Dsd5QmAe.js.map → admin-imports-BrQH3u9M.js.map} +1 -1
- package/dist/{admin-input-DhYEd7Yp.js → admin-input-BZ2ExV_5.js} +2 -2
- package/dist/{admin-input-DhYEd7Yp.js.map → admin-input-BZ2ExV_5.js.map} +1 -1
- package/dist/{admin-label-DwUfUVm6.js → admin-label-DecDO0oV.js} +2 -2
- package/dist/{admin-label-DwUfUVm6.js.map → admin-label-DecDO0oV.js.map} +1 -1
- package/dist/{admin-linked-table-row-CqG_aCwd.js → admin-linked-table-row-ChxhVptQ.js} +3 -3
- package/dist/{admin-linked-table-row-CqG_aCwd.js.map → admin-linked-table-row-ChxhVptQ.js.map} +1 -1
- package/dist/{admin-map-dialog-DZuPq4UA.js → admin-map-dialog-CQmGOBMw.js} +12 -12
- package/dist/{admin-map-dialog-DZuPq4UA.js.map → admin-map-dialog-CQmGOBMw.js.map} +1 -1
- package/dist/admin-metering-OXGOVQ7e.js +1716 -0
- package/dist/{admin-metering-kGrQIiEX.js.map → admin-metering-OXGOVQ7e.js.map} +1 -1
- package/dist/{admin-missing-record-CjIQEv9L.js → admin-missing-record-B_9LpSIW.js} +4 -4
- package/dist/{admin-missing-record-CjIQEv9L.js.map → admin-missing-record-B_9LpSIW.js.map} +1 -1
- package/dist/admin-ops-BTSunx1i.js +357 -0
- package/dist/{admin-ops-B1Gwrsq6.js.map → admin-ops-BTSunx1i.js.map} +1 -1
- package/dist/{admin-orders-DRpUMK7N.js → admin-orders-LqlpQVFo.js} +59 -60
- package/dist/{admin-orders-DRpUMK7N.js.map → admin-orders-LqlpQVFo.js.map} +1 -1
- package/dist/{admin-parked-uH5dSPjL.js → admin-parked-Ch6mlS5f.js} +61 -62
- package/dist/{admin-parked-uH5dSPjL.js.map → admin-parked-Ch6mlS5f.js.map} +1 -1
- package/dist/{admin-payments-DFW5O19Q.js → admin-payments-yNntF4i4.js} +42 -42
- package/dist/{admin-payments-DFW5O19Q.js.map → admin-payments-yNntF4i4.js.map} +1 -1
- package/dist/{admin-price-detail-CaUekDWP.js → admin-price-detail-DvmcYr8B.js} +131 -132
- package/dist/admin-price-detail-DvmcYr8B.js.map +1 -0
- package/dist/{admin-price-format-BrXm8J1w.js → admin-price-format-Btdg11-J.js} +2 -2
- package/dist/{admin-price-format-BrXm8J1w.js.map → admin-price-format-Btdg11-J.js.map} +1 -1
- package/dist/admin-price-wizard-EFO3nBV8.js +376 -0
- package/dist/admin-price-wizard-EFO3nBV8.js.map +1 -0
- package/dist/{admin-proposals-BuPBTbX7.js → admin-proposals-CO0LKHM8.js} +119 -120
- package/dist/{admin-proposals-BuPBTbX7.js.map → admin-proposals-CO0LKHM8.js.map} +1 -1
- package/dist/admin-provider-prices-ZjQeEV1n.js +239 -0
- package/dist/{admin-provider-prices-BtyrGlSd.js.map → admin-provider-prices-ZjQeEV1n.js.map} +1 -1
- package/dist/admin-query-builder-DedekYUU.js +252 -0
- package/dist/admin-query-builder-DedekYUU.js.map +1 -0
- package/dist/{admin-range-picker-B1C1R9Yh.js → admin-range-picker-1WGFlYYw.js} +46 -24
- package/dist/admin-range-picker-1WGFlYYw.js.map +1 -0
- package/dist/admin-records-A2R52prt.js +389 -0
- package/dist/{admin-records-CZ_Q1j7i.js.map → admin-records-A2R52prt.js.map} +1 -1
- package/dist/admin-reports-ySY9v463.js +420 -0
- package/dist/admin-reports-ySY9v463.js.map +1 -0
- package/dist/{admin-select-CCliJ9d-.js → admin-select-CgZq2j0G.js} +2 -2
- package/dist/{admin-select-CCliJ9d-.js.map → admin-select-CgZq2j0G.js.map} +1 -1
- package/dist/admin-settings-kOW1nPGB.js +1818 -0
- package/dist/admin-settings-kOW1nPGB.js.map +1 -0
- package/dist/{admin-shared-Bozlh9cy.js → admin-shared-DoBOSwkv.js} +33 -34
- package/dist/{admin-shared-Bozlh9cy.js.map → admin-shared-DoBOSwkv.js.map} +1 -1
- package/dist/admin-signals-D_iWk2r5.js +124 -0
- package/dist/admin-signals-D_iWk2r5.js.map +1 -0
- package/dist/{admin-skeleton-CKxohm-g.js → admin-skeleton-DdqwXcr4.js} +2 -2
- package/dist/{admin-skeleton-CKxohm-g.js.map → admin-skeleton-DdqwXcr4.js.map} +1 -1
- package/dist/{admin-status-badge-BhHyBG8J.js → admin-status-badge-B8rjk6QR.js} +5 -3
- package/dist/admin-status-badge-B8rjk6QR.js.map +1 -0
- package/dist/{admin-subscriptions-VwEbVACW.js → admin-subscriptions-CjYPSPs-.js} +43 -38
- package/dist/admin-subscriptions-CjYPSPs-.js.map +1 -0
- package/dist/{admin-switch-CE0N-HwZ.js → admin-switch-CyYmt8wi.js} +2 -2
- package/dist/{admin-switch-CE0N-HwZ.js.map → admin-switch-CyYmt8wi.js.map} +1 -1
- package/dist/{admin-table-Ce6xyiwJ.js → admin-table-ByPfWNq8.js} +2 -2
- package/dist/{admin-table-Ce6xyiwJ.js.map → admin-table-ByPfWNq8.js.map} +1 -1
- package/dist/admin-tabs-DKa6QljL.js +45 -0
- package/dist/admin-tabs-DKa6QljL.js.map +1 -0
- package/dist/{admin-textarea-CBAshts8.js → admin-textarea-CQg__KGc.js} +2 -2
- package/dist/{admin-textarea-CBAshts8.js.map → admin-textarea-CQg__KGc.js.map} +1 -1
- package/dist/{admin-typed-confirm-dialog-C1kHdYgH.js → admin-typed-confirm-dialog-BvAYEh3H.js} +6 -6
- package/dist/{admin-typed-confirm-dialog-C1kHdYgH.js.map → admin-typed-confirm-dialog-BvAYEh3H.js.map} +1 -1
- package/dist/admin-widget-tile-DDI3eaRy.js +290 -0
- package/dist/admin-widget-tile-DDI3eaRy.js.map +1 -0
- package/dist/admin-widget-viz-Db9CQ2Sx.js +1084 -0
- package/dist/admin-widget-viz-Db9CQ2Sx.js.map +1 -0
- package/dist/admin.css +1 -1
- package/dist/admin.js +660 -609
- package/dist/admin.js.map +1 -1
- package/dist/buy-button.d.ts +4 -2
- package/dist/cart.d.ts +4 -2
- package/dist/client/client.d.ts +16 -3
- package/dist/client/generated/error-codes.d.ts +1 -1
- package/dist/client/generated/routes.d.ts +296 -181
- package/dist/client/generated/wire.d.ts +509 -277
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.d.ts +70 -6
- package/dist/{client-BrURpRWz.js → client-D8qT6xjo.js} +84 -44
- package/dist/client-D8qT6xjo.js.map +1 -0
- package/dist/client.js +1 -1
- package/dist/components/billing-fields.d.ts +5 -3
- package/dist/components/platform-card-form.d.ts +3 -1
- package/dist/{hooks-Bbp1RWgw.js → hooks-CX09fAJA.js} +86 -60
- package/dist/hooks-CX09fAJA.js.map +1 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +842 -779
- package/dist/index.js.map +1 -1
- package/dist/lib/billing-fields.d.ts +15 -0
- package/dist/lib/billing.d.ts +23 -5
- package/dist/product-list.d.ts +4 -2
- package/dist/react/config.d.ts +10 -2
- package/dist/react/index.d.ts +1 -1
- package/dist/react.js +1 -1
- package/dist/styles.css +1 -1
- package/dist/tokenized-card-form.d.ts +10 -2
- package/docs/payment-form-contract.md +6 -15
- package/package.json +6 -6
- package/dist/admin/lib/api/copilot.d.ts +0 -6
- package/dist/admin/pages/catalog/copilot-panel.d.ts +0 -4
- package/dist/admin-attempts-Cs2u-BLY.js +0 -418
- package/dist/admin-attempts-Cs2u-BLY.js.map +0 -1
- package/dist/admin-capabilities-uSi2Pb2h.js.map +0 -1
- package/dist/admin-catalog-DB5lr46V.js +0 -1096
- package/dist/admin-catalog-DB5lr46V.js.map +0 -1
- package/dist/admin-customers-DFQ75ZBi.js.map +0 -1
- package/dist/admin-dashboard-Q_4-OFsE.js +0 -461
- package/dist/admin-dashboard-Q_4-OFsE.js.map +0 -1
- package/dist/admin-detail-BytmF-e3.js +0 -293
- package/dist/admin-detail-CG3kLIDS.js.map +0 -1
- package/dist/admin-detail-RS0o4-Cq.js +0 -1351
- package/dist/admin-detail-RS0o4-Cq.js.map +0 -1
- package/dist/admin-detail-wttCvrxI.js +0 -337
- package/dist/admin-format-D9Ablh0P.js +0 -169
- package/dist/admin-format-D9Ablh0P.js.map +0 -1
- package/dist/admin-health-DWpONa-7.js.map +0 -1
- package/dist/admin-metering-kGrQIiEX.js +0 -1717
- package/dist/admin-ops-B1Gwrsq6.js +0 -358
- package/dist/admin-price-detail-CaUekDWP.js.map +0 -1
- package/dist/admin-price-wizard-CCejN6lZ.js +0 -355
- package/dist/admin-price-wizard-CCejN6lZ.js.map +0 -1
- package/dist/admin-provider-prices-BtyrGlSd.js +0 -240
- package/dist/admin-range-picker-B1C1R9Yh.js.map +0 -1
- package/dist/admin-records-CZ_Q1j7i.js +0 -390
- package/dist/admin-reports-ZDEVF7aC.js +0 -319
- package/dist/admin-reports-ZDEVF7aC.js.map +0 -1
- package/dist/admin-settings-HBiilJTI.js +0 -1818
- package/dist/admin-settings-HBiilJTI.js.map +0 -1
- package/dist/admin-status-badge-BhHyBG8J.js.map +0 -1
- package/dist/admin-subscriptions-VwEbVACW.js.map +0 -1
- package/dist/admin-tabs-BPfOyBa6.js +0 -156
- package/dist/admin-tabs-BPfOyBa6.js.map +0 -1
- package/dist/admin-utils-CuwG3SAt.js.map +0 -1
- package/dist/admin-widget-viz-Dd1Fjd_j.js +0 -643
- package/dist/admin-widget-viz-Dd1Fjd_j.js.map +0 -1
- package/dist/client-BrURpRWz.js.map +0 -1
- package/dist/hooks-Bbp1RWgw.js.map +0 -1
|
@@ -6,67 +6,21 @@ export type AccessTenure = {
|
|
|
6
6
|
as_of: string;
|
|
7
7
|
seconds: Record<string, number> | null;
|
|
8
8
|
};
|
|
9
|
+
export type AccountingSettings = {
|
|
10
|
+
timezone?: string;
|
|
11
|
+
};
|
|
12
|
+
export type AdjustCustomerLimitParams = {
|
|
13
|
+
limit?: string;
|
|
14
|
+
amount?: string;
|
|
15
|
+
source_id?: string;
|
|
16
|
+
};
|
|
9
17
|
export type AdminAccess = {
|
|
10
18
|
admin: "none" | "read" | "update";
|
|
11
19
|
catalog: "none" | "read" | "update";
|
|
12
20
|
merchant_config: "none" | "read" | "update";
|
|
13
21
|
metrics: boolean;
|
|
14
22
|
scope_id: string;
|
|
15
|
-
|
|
16
|
-
application_permissions: ("merchant:catalog:manage" | "merchant:catalog:read" | "merchant:config:manage" | "merchant:config:read" | "merchant:customer:manage" | "merchant:customer:read" | "merchant:customers:read" | "merchant:entitlements:read" | "merchant:events:read" | "merchant:metrics:read" | "merchant:orders:manage" | "merchant:usage:manage" | "merchant:usage:read" | "root:admin-rate-limits:unlock" | "root:catalog:manage" | "root:catalog:read" | "root:config:manage" | "root:config:read" | "root:customer:manage" | "root:customer:read" | "root:customers:read" | "root:entitlements:read" | "root:events:read" | "root:merchants:delete" | "root:merchants:read" | "root:merchants:restore" | "root:metrics:read" | "root:orders:manage" | "root:usage:manage" | "root:usage:read" | "root:worker-health:read")[];
|
|
17
|
-
};
|
|
18
|
-
export type AdminAssistants = {
|
|
19
|
-
catalog_copilot: boolean;
|
|
20
|
-
catalog_drafting: boolean;
|
|
21
|
-
};
|
|
22
|
-
export type Admission = {
|
|
23
|
-
request_id: string;
|
|
24
|
-
customer_id: string;
|
|
25
|
-
allowed: boolean;
|
|
26
|
-
blocked_by: "abuse" | "budget" | "money" | null;
|
|
27
|
-
deny_code: string | null;
|
|
28
|
-
retry_after_seconds: number | null;
|
|
29
|
-
currency: string;
|
|
30
|
-
estimated_amount: string;
|
|
31
|
-
start_capacity_amount: string;
|
|
32
|
-
state: "captured" | "expired" | "open" | "released" | null;
|
|
33
|
-
expires_at: string | null;
|
|
34
|
-
captured_amount: string | null;
|
|
35
|
-
replayed: boolean;
|
|
36
|
-
};
|
|
37
|
-
export type AdmissionBatchResult = {
|
|
38
|
-
items: AdmissionResult[];
|
|
39
|
-
};
|
|
40
|
-
export type AdmissionResult = {
|
|
41
|
-
status: number;
|
|
42
|
-
admission: Admission | null;
|
|
43
|
-
error: ErrorDetails | null;
|
|
44
|
-
};
|
|
45
|
-
export type AdmissionVerdict = {
|
|
46
|
-
status: number;
|
|
47
|
-
admission: Admission | null;
|
|
48
|
-
error: ErrorDetails | null;
|
|
49
|
-
};
|
|
50
|
-
export type AdmitBatchParams = {
|
|
51
|
-
items?: AdmitParams[];
|
|
52
|
-
};
|
|
53
|
-
export type AdmitBatchResult = {
|
|
54
|
-
items: AdmissionVerdict[];
|
|
55
|
-
};
|
|
56
|
-
export type AdmitParams = {
|
|
57
|
-
request_id?: string;
|
|
58
|
-
customer_id?: string;
|
|
59
|
-
invoker?: string;
|
|
60
|
-
invoker_type?: "customer" | "delegated";
|
|
61
|
-
trust_level?: string;
|
|
62
|
-
resource?: string;
|
|
63
|
-
currency?: string;
|
|
64
|
-
estimated_amount?: string;
|
|
65
|
-
usage?: UsageEstimate;
|
|
66
|
-
accrual_rate_delta_per_hour?: string;
|
|
67
|
-
source?: string;
|
|
68
|
-
expires_at?: string;
|
|
69
|
-
roles?: string[];
|
|
23
|
+
application_permissions: ("merchant:catalog:manage" | "merchant:catalog:read" | "merchant:config:manage" | "merchant:config:read" | "merchant:customer:manage" | "merchant:customer:read" | "merchant:entitlements:read" | "merchant:events:read" | "merchant:metrics:read" | "merchant:orders:manage" | "merchant:provisioning:manage" | "merchant:provisioning:read" | "merchant:usage:manage" | "merchant:usage:read" | "root:admin-rate-limits:unlock" | "root:catalog:manage" | "root:catalog:read" | "root:config:manage" | "root:config:read" | "root:customer:manage" | "root:customer:read" | "root:entitlements:read" | "root:events:read" | "root:merchants:delete" | "root:merchants:read" | "root:merchants:restore" | "root:metrics:read" | "root:orders:manage" | "root:provisioning:manage" | "root:provisioning:read" | "root:usage:manage" | "root:usage:read" | "root:worker-health:read")[];
|
|
70
24
|
};
|
|
71
25
|
export type Agreement = {
|
|
72
26
|
id: string;
|
|
@@ -110,6 +64,13 @@ export type Application = {
|
|
|
110
64
|
entitlement_replacements?: EntitlementReplacement[];
|
|
111
65
|
products?: Record<string, ApplyProduct>;
|
|
112
66
|
meters?: Record<string, ApplyMeter>;
|
|
67
|
+
limits?: Record<string, ApplyLimit>;
|
|
68
|
+
};
|
|
69
|
+
export type ApplyLimit = {
|
|
70
|
+
unit?: string | null;
|
|
71
|
+
reset?: LimitReset | null;
|
|
72
|
+
overrun?: "admit_while_positive" | "require_estimate" | null;
|
|
73
|
+
counts?: LimitCount[] | null;
|
|
113
74
|
};
|
|
114
75
|
export type ApplyMeter = {
|
|
115
76
|
event_type?: string | null;
|
|
@@ -130,7 +91,7 @@ export type ApplyPrice = {
|
|
|
130
91
|
trial_duration_hours?: number | null;
|
|
131
92
|
customer_amount?: CustomerAmount | null;
|
|
132
93
|
quantity?: Quantity | null;
|
|
133
|
-
sell_via?:
|
|
94
|
+
sell_via?: ("card" | "solana")[] | null;
|
|
134
95
|
amount?: string;
|
|
135
96
|
access_duration?: string | null;
|
|
136
97
|
billing_interval?: string | null;
|
|
@@ -149,6 +110,7 @@ export type ApplyProduct = {
|
|
|
149
110
|
prices?: Record<string, ApplyPrice>;
|
|
150
111
|
provider_prices?: Record<string, ApplyProviderPrice>;
|
|
151
112
|
rate_cards?: RateCard[] | null;
|
|
113
|
+
limits?: Record<string, string> | null;
|
|
152
114
|
};
|
|
153
115
|
export type ApplyProviderPrice = {
|
|
154
116
|
psp?: string;
|
|
@@ -169,12 +131,10 @@ export type ApproveProposalsParams = {
|
|
|
169
131
|
ids?: string[];
|
|
170
132
|
notes?: string;
|
|
171
133
|
};
|
|
172
|
-
export type AskCatalogParams = {
|
|
173
|
-
question?: string;
|
|
174
|
-
};
|
|
175
134
|
export type Balance = {
|
|
176
135
|
customer_id: string;
|
|
177
136
|
currency: string;
|
|
137
|
+
unit: MerchantCurrency | null;
|
|
178
138
|
billing_mode: "arrears" | "prepaid";
|
|
179
139
|
balance_amount: string;
|
|
180
140
|
held_amount: string;
|
|
@@ -197,13 +157,14 @@ export type BalanceTransaction = {
|
|
|
197
157
|
id: string;
|
|
198
158
|
customer_id: string;
|
|
199
159
|
currency: string;
|
|
200
|
-
type: "deposit" | "expire" | "owed_accrual" | "owed_payment" | "owed_repayment" | "owed_writeoff" | "reinstate" | "revoke" | "spend";
|
|
160
|
+
type: "deposit" | "expire" | "owed_accrual" | "owed_payment" | "owed_reopened" | "owed_repayment" | "owed_writeoff" | "reinstate" | "revoke" | "spend";
|
|
201
161
|
amount: string;
|
|
202
162
|
credit_grant_id: string | null;
|
|
203
163
|
invoker: string | null;
|
|
204
164
|
resource: string | null;
|
|
205
165
|
source: string;
|
|
206
166
|
source_id: string;
|
|
167
|
+
usage: UsageDeduction | null;
|
|
207
168
|
created_at: string;
|
|
208
169
|
};
|
|
209
170
|
export type BillingAddress = {
|
|
@@ -226,6 +187,10 @@ export type BillingDetails = {
|
|
|
226
187
|
phone: string | null;
|
|
227
188
|
address: BillingAddress | null;
|
|
228
189
|
};
|
|
190
|
+
export type BillingFieldSettings = {
|
|
191
|
+
country?: "auto" | "hidden" | "optional" | "required";
|
|
192
|
+
postal_code?: "auto" | "hidden" | "optional" | "required";
|
|
193
|
+
};
|
|
229
194
|
export type BillingImportResult = {
|
|
230
195
|
imported: string[];
|
|
231
196
|
skipped: string[];
|
|
@@ -277,41 +242,6 @@ export type CaptchaConfig = {
|
|
|
277
242
|
action: string;
|
|
278
243
|
token_header: string;
|
|
279
244
|
};
|
|
280
|
-
export type CaptureAdmissionBatchParams = {
|
|
281
|
-
items?: CaptureAdmissionParams[];
|
|
282
|
-
};
|
|
283
|
-
export type CaptureAdmissionParams = {
|
|
284
|
-
request_id?: string;
|
|
285
|
-
usage: CaptureUsage;
|
|
286
|
-
amount?: string;
|
|
287
|
-
};
|
|
288
|
-
export type CaptureBatchResult = {
|
|
289
|
-
items: CaptureResult[];
|
|
290
|
-
};
|
|
291
|
-
export type CaptureReceipt = {
|
|
292
|
-
request_id: string;
|
|
293
|
-
customer_id: string;
|
|
294
|
-
currency: string;
|
|
295
|
-
estimated_amount: string;
|
|
296
|
-
amount: string;
|
|
297
|
-
charges: UsageCharge[];
|
|
298
|
-
usage_event_id: string | null;
|
|
299
|
-
balance_transaction_id: string | null;
|
|
300
|
-
replayed: boolean;
|
|
301
|
-
};
|
|
302
|
-
export type CaptureResult = {
|
|
303
|
-
status: number;
|
|
304
|
-
receipt: CaptureReceipt | null;
|
|
305
|
-
error: ErrorDetails | null;
|
|
306
|
-
};
|
|
307
|
-
export type CaptureUsage = {
|
|
308
|
-
event_type?: string;
|
|
309
|
-
resource?: string;
|
|
310
|
-
metadata?: Record<string, unknown>;
|
|
311
|
-
source?: string;
|
|
312
|
-
source_id?: string;
|
|
313
|
-
dimensions?: Record<string, number>;
|
|
314
|
-
};
|
|
315
245
|
export type CardDetails = {
|
|
316
246
|
brand: string | null;
|
|
317
247
|
last4: string | null;
|
|
@@ -332,11 +262,6 @@ export type Cart = {
|
|
|
332
262
|
last_changed_at: string | null;
|
|
333
263
|
expires_at: string | null;
|
|
334
264
|
};
|
|
335
|
-
export type CatalogAnswer = {
|
|
336
|
-
answer: string;
|
|
337
|
-
evidence: CatalogEvidence[];
|
|
338
|
-
drafts: CatalogDraft[];
|
|
339
|
-
};
|
|
340
265
|
export type CatalogApplicationReceipt = {
|
|
341
266
|
application_id: string;
|
|
342
267
|
base_revision: number;
|
|
@@ -350,35 +275,20 @@ export type CatalogApplicationReceipt = {
|
|
|
350
275
|
warnings: CatalogWarning[];
|
|
351
276
|
};
|
|
352
277
|
export type CatalogChange = {
|
|
353
|
-
object: "meter" | "price" | "product";
|
|
278
|
+
object: "limit" | "meter" | "price" | "product";
|
|
354
279
|
key: string;
|
|
355
280
|
product_key: string | null;
|
|
356
281
|
fields: string[];
|
|
357
282
|
revision: number;
|
|
283
|
+
deleted: boolean;
|
|
358
284
|
};
|
|
359
285
|
export type CatalogConflict = {
|
|
360
|
-
object: "meter" | "price" | "product";
|
|
286
|
+
object: "limit" | "meter" | "price" | "product";
|
|
361
287
|
key: string;
|
|
362
288
|
product_key: string | null;
|
|
363
289
|
currency: string | null;
|
|
364
290
|
fields: CatalogFieldConflict[];
|
|
365
291
|
};
|
|
366
|
-
export type CatalogDraft = {
|
|
367
|
-
kind: "new_price" | "price_change" | "refused";
|
|
368
|
-
price_change: PriceChangeDraft | null;
|
|
369
|
-
new_price: NewPriceDraft | null;
|
|
370
|
-
refusal: CatalogDraftRefusal | null;
|
|
371
|
-
};
|
|
372
|
-
export type CatalogDraftRefusal = {
|
|
373
|
-
code: string;
|
|
374
|
-
reason: string;
|
|
375
|
-
workaround: string;
|
|
376
|
-
};
|
|
377
|
-
export type CatalogEvidence = {
|
|
378
|
-
tool: string;
|
|
379
|
-
args: string;
|
|
380
|
-
summary: string;
|
|
381
|
-
};
|
|
382
292
|
export type CatalogFieldConflict = {
|
|
383
293
|
field: string;
|
|
384
294
|
file_value: unknown | null;
|
|
@@ -421,6 +331,7 @@ export type CheckEntitlementsParams = {
|
|
|
421
331
|
prefixes?: string[];
|
|
422
332
|
prefix_limit?: number;
|
|
423
333
|
at?: string;
|
|
334
|
+
include_validity?: boolean;
|
|
424
335
|
};
|
|
425
336
|
export type ClearDestructiveHoldParams = {
|
|
426
337
|
reason?: string;
|
|
@@ -449,6 +360,7 @@ export type CreateCreditGrantParams = {
|
|
|
449
360
|
amount?: string;
|
|
450
361
|
source_id?: string;
|
|
451
362
|
source?: string;
|
|
363
|
+
funding_source?: "grant" | "import" | "promotion";
|
|
452
364
|
invoker?: string;
|
|
453
365
|
expires_at?: string;
|
|
454
366
|
description?: string;
|
|
@@ -460,12 +372,14 @@ export type CreateMyOrderParams = {
|
|
|
460
372
|
payment?: OrderPaymentParams;
|
|
461
373
|
reusable?: boolean;
|
|
462
374
|
pay_url?: MyOrderPayURLParams;
|
|
375
|
+
attribution?: OrderAttribution;
|
|
463
376
|
};
|
|
464
377
|
export type CreateOrderParams = {
|
|
465
378
|
customer_id?: string;
|
|
466
379
|
lines?: OrderLineParams[];
|
|
467
380
|
expires_at?: string;
|
|
468
381
|
pay_url?: OrderPayURLParams;
|
|
382
|
+
attribution?: OrderAttribution;
|
|
469
383
|
};
|
|
470
384
|
export type CreatePSPImportParams = {
|
|
471
385
|
psp?: PSPRef;
|
|
@@ -475,7 +389,7 @@ export type CreatePSPImportParams = {
|
|
|
475
389
|
export type CreatePSPParams = {
|
|
476
390
|
key?: string;
|
|
477
391
|
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
478
|
-
environment?:
|
|
392
|
+
environment?: "devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet";
|
|
479
393
|
custodian?: string;
|
|
480
394
|
gateway_id?: string;
|
|
481
395
|
account_id?: string;
|
|
@@ -509,20 +423,20 @@ export type CreatePriceParams = {
|
|
|
509
423
|
product_key?: string;
|
|
510
424
|
product_data?: CreatePriceProduct;
|
|
511
425
|
key?: string;
|
|
512
|
-
unit_amount
|
|
513
|
-
currency
|
|
426
|
+
unit_amount?: string;
|
|
427
|
+
currency?: string;
|
|
514
428
|
access_duration_hours?: number;
|
|
515
429
|
billing_interval_hours?: number;
|
|
516
430
|
billing_interval_months?: number;
|
|
517
431
|
trial_unit_amount?: string;
|
|
518
432
|
trial_duration_hours?: number;
|
|
519
|
-
sell_via?:
|
|
433
|
+
sell_via?: ("card" | "solana")[];
|
|
520
434
|
archived?: boolean;
|
|
521
435
|
expected_revision?: number;
|
|
522
436
|
};
|
|
523
437
|
export type CreatePriceProduct = {
|
|
524
|
-
key
|
|
525
|
-
display_name
|
|
438
|
+
key?: string;
|
|
439
|
+
display_name?: string;
|
|
526
440
|
description?: string;
|
|
527
441
|
};
|
|
528
442
|
export type CreateProductAccessBatchParams = {
|
|
@@ -572,6 +486,11 @@ export type CreateProviderPriceParams = {
|
|
|
572
486
|
export type CreateProvisioningTokenParams = {
|
|
573
487
|
name?: string;
|
|
574
488
|
};
|
|
489
|
+
export type CreateTestMessageParams = {
|
|
490
|
+
event_type?: string;
|
|
491
|
+
language?: string;
|
|
492
|
+
template?: MessageTemplate | null;
|
|
493
|
+
};
|
|
575
494
|
export type CreatedProvisioningToken = {
|
|
576
495
|
id: string;
|
|
577
496
|
name: string;
|
|
@@ -589,15 +508,18 @@ export type CreditGrant = {
|
|
|
589
508
|
remaining_amount: string;
|
|
590
509
|
revoked_amount: string;
|
|
591
510
|
expired_amount: string;
|
|
592
|
-
|
|
593
|
-
|
|
511
|
+
refunded_amount: string;
|
|
512
|
+
state: "active" | "expired" | "pending" | "refunded" | "revoked" | "scheduled" | "spent";
|
|
513
|
+
funding_source: "grant" | "import" | "promotion" | "purchase" | "recurring";
|
|
514
|
+
paid_amount: string | null;
|
|
515
|
+
paid_currency: string | null;
|
|
594
516
|
source_id: string | null;
|
|
595
517
|
description: string | null;
|
|
596
518
|
starts_at: string;
|
|
597
519
|
expires_at: string | null;
|
|
598
520
|
created_at: string;
|
|
599
|
-
|
|
600
|
-
|
|
521
|
+
revoked_at: string | null;
|
|
522
|
+
revoke_reason: string | null;
|
|
601
523
|
replayed: boolean;
|
|
602
524
|
};
|
|
603
525
|
export type CreditGrantSpec = {
|
|
@@ -618,8 +540,8 @@ export type CurrencyUnits = {
|
|
|
618
540
|
};
|
|
619
541
|
export type Custodian = {
|
|
620
542
|
key: string;
|
|
621
|
-
kind:
|
|
622
|
-
environment:
|
|
543
|
+
kind: "basis_theory" | "hyperswitch";
|
|
544
|
+
environment: "devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet";
|
|
623
545
|
account_id: string;
|
|
624
546
|
settings: Record<string, unknown> | null;
|
|
625
547
|
credentials: Record<string, PSPCredential> | null;
|
|
@@ -664,6 +586,7 @@ export type CustomerConfig = {
|
|
|
664
586
|
payment: PaymentConfig;
|
|
665
587
|
merchant: PublicMerchant;
|
|
666
588
|
client_country: string;
|
|
589
|
+
currencies: MerchantCurrency[];
|
|
667
590
|
};
|
|
668
591
|
export type CustomerContact = {
|
|
669
592
|
email: string | null;
|
|
@@ -677,11 +600,37 @@ export type CustomerEntitlement = {
|
|
|
677
600
|
entitlement: string;
|
|
678
601
|
quantity: number | null;
|
|
679
602
|
};
|
|
603
|
+
export type CustomerLimit = {
|
|
604
|
+
customer_id: string;
|
|
605
|
+
limit: string;
|
|
606
|
+
unit: string;
|
|
607
|
+
capacity: string;
|
|
608
|
+
used: string;
|
|
609
|
+
held: string;
|
|
610
|
+
remaining: string;
|
|
611
|
+
window_starts_at: string | null;
|
|
612
|
+
resets_at: string | null;
|
|
613
|
+
};
|
|
614
|
+
export type CustomerMessage = {
|
|
615
|
+
id: string;
|
|
616
|
+
customer_id: string;
|
|
617
|
+
event_id: string;
|
|
618
|
+
event_type: string;
|
|
619
|
+
channel: "email";
|
|
620
|
+
status: "disabled" | "failed" | "no_contact" | "pending" | "queued" | "rate_limited" | "sending" | "sent" | "test_environment";
|
|
621
|
+
attempts: number;
|
|
622
|
+
last_error: "event_missing" | "event_unreadable" | "invalid_recipient" | "no_sender" | "refused" | "render_failed" | "send_failed" | "unavailable" | null;
|
|
623
|
+
recipient: string | null;
|
|
624
|
+
sent_at: string | null;
|
|
625
|
+
created_at: string;
|
|
626
|
+
updated_at: string;
|
|
627
|
+
};
|
|
680
628
|
export type CustomerSettings = {
|
|
681
629
|
usage_billing?: UsageBillingAccount[];
|
|
682
630
|
credit_limits: CreditLimit[];
|
|
683
631
|
trust_levels: TrustLevel[];
|
|
684
632
|
low_balance_lines: LowBalanceLine[];
|
|
633
|
+
limits: LimitOverride[];
|
|
685
634
|
billing_policy: string | null;
|
|
686
635
|
invoice_profile: InvoiceProfile | null;
|
|
687
636
|
};
|
|
@@ -692,6 +641,7 @@ export type CustomerSettingsResult = {
|
|
|
692
641
|
export type Dashboard = {
|
|
693
642
|
widgets: DashboardWidget[];
|
|
694
643
|
is_default: boolean;
|
|
644
|
+
profile: DashboardProfile | null;
|
|
695
645
|
updated_at: string | null;
|
|
696
646
|
updated_by: string | null;
|
|
697
647
|
};
|
|
@@ -701,11 +651,18 @@ export type DashboardGrid = {
|
|
|
701
651
|
w: number;
|
|
702
652
|
h: number;
|
|
703
653
|
};
|
|
654
|
+
export type DashboardProfile = {
|
|
655
|
+
subscriptions: boolean;
|
|
656
|
+
card_payments: boolean;
|
|
657
|
+
usage: boolean;
|
|
658
|
+
credits: boolean;
|
|
659
|
+
checkouts: boolean;
|
|
660
|
+
};
|
|
704
661
|
export type DashboardWidget = {
|
|
705
662
|
id: string;
|
|
706
663
|
title: string;
|
|
707
664
|
viz: string;
|
|
708
|
-
query:
|
|
665
|
+
query: QueryMetricsParams;
|
|
709
666
|
grid: DashboardGrid;
|
|
710
667
|
fixed_range: boolean;
|
|
711
668
|
};
|
|
@@ -738,7 +695,7 @@ export type DeclaredHistoricalPayment = {
|
|
|
738
695
|
source_id?: string;
|
|
739
696
|
customer?: string;
|
|
740
697
|
psp?: PSPRef;
|
|
741
|
-
rail?:
|
|
698
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
742
699
|
transaction_id?: string;
|
|
743
700
|
amount?: string;
|
|
744
701
|
currency?: string;
|
|
@@ -760,13 +717,13 @@ export type DeclaredOrderLine = {
|
|
|
760
717
|
export type DeclaredPSPCustomer = {
|
|
761
718
|
source_id?: string;
|
|
762
719
|
customer?: string;
|
|
763
|
-
rail?:
|
|
720
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
764
721
|
psp?: PSPRef;
|
|
765
722
|
remote_customer_ref?: string;
|
|
766
723
|
};
|
|
767
724
|
export type DeclaredPaymentMethod = {
|
|
768
725
|
customer?: string;
|
|
769
|
-
rail?:
|
|
726
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
770
727
|
psp?: PSPRef;
|
|
771
728
|
rail_customer_ref?: string;
|
|
772
729
|
rail_method_ref?: string;
|
|
@@ -786,7 +743,7 @@ export type DeclaredProviderSchedule = {
|
|
|
786
743
|
export type DeclaredPurchase = {
|
|
787
744
|
source_id?: string;
|
|
788
745
|
customer?: string;
|
|
789
|
-
rail?:
|
|
746
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
790
747
|
psp?: PSPRef;
|
|
791
748
|
transaction_id?: string;
|
|
792
749
|
currency?: string;
|
|
@@ -799,8 +756,8 @@ export type DeclaredPurchase = {
|
|
|
799
756
|
export type DeclaredSettlement = {
|
|
800
757
|
asset?: string;
|
|
801
758
|
quantity?: string;
|
|
802
|
-
|
|
803
|
-
|
|
759
|
+
from_wallet?: string;
|
|
760
|
+
to_wallet?: string;
|
|
804
761
|
};
|
|
805
762
|
export type DeclaredStripeInvoice = {
|
|
806
763
|
id?: string;
|
|
@@ -839,7 +796,7 @@ export type DeclaredSubscription = {
|
|
|
839
796
|
source_id?: string;
|
|
840
797
|
customer?: string;
|
|
841
798
|
price?: string;
|
|
842
|
-
rail?:
|
|
799
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
843
800
|
rail_subscription_id?: string;
|
|
844
801
|
psp?: PSPRef;
|
|
845
802
|
started_at?: string;
|
|
@@ -883,6 +840,51 @@ export type DismissProposalsParams = {
|
|
|
883
840
|
ids?: string[];
|
|
884
841
|
notes?: string;
|
|
885
842
|
};
|
|
843
|
+
export type Dispute = {
|
|
844
|
+
id: string;
|
|
845
|
+
provider_ref: string;
|
|
846
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
847
|
+
psp_id: string;
|
|
848
|
+
customer_id: string | null;
|
|
849
|
+
payment_id: string | null;
|
|
850
|
+
kind: "chargeback" | "inquiry" | "prevented" | "unknown";
|
|
851
|
+
status: "closed" | "lost" | "open" | "unreported" | "won";
|
|
852
|
+
network: "amex" | "diners" | "discover" | "jcb" | "mastercard" | "other" | "unionpay" | "unknown" | "visa";
|
|
853
|
+
reason: "authorization" | "canceled_recurring" | "credit_not_processed" | "duplicate" | "fraud" | "not_as_described" | "not_received" | "other" | "processing_error" | "unknown" | "unrecognized";
|
|
854
|
+
reason_code: string;
|
|
855
|
+
provider_reason: string;
|
|
856
|
+
amount: string | null;
|
|
857
|
+
currency: string | null;
|
|
858
|
+
disputed_at: string;
|
|
859
|
+
chargeback_at: string | null;
|
|
860
|
+
evidence_due_at: string | null;
|
|
861
|
+
closed_at: string | null;
|
|
862
|
+
reversal_payment_id: string | null;
|
|
863
|
+
recovery_payment_id: string | null;
|
|
864
|
+
};
|
|
865
|
+
export type DisputeStanding = {
|
|
866
|
+
psp_id: string;
|
|
867
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
868
|
+
program: "acquirer" | "mastercard_ecp" | "mastercard_efm" | "stripe" | "visa_vamp";
|
|
869
|
+
month: string;
|
|
870
|
+
count: string;
|
|
871
|
+
denominator: string;
|
|
872
|
+
ratio: number;
|
|
873
|
+
projected_ratio: number;
|
|
874
|
+
projected_count: string;
|
|
875
|
+
level: "excessive" | "high_excessive" | "none" | "warning";
|
|
876
|
+
thresholds: DisputeThreshold[];
|
|
877
|
+
fraud_reports_visible: boolean;
|
|
878
|
+
disputes_reported: boolean;
|
|
879
|
+
};
|
|
880
|
+
export type DisputeThreshold = {
|
|
881
|
+
level: "excessive" | "high_excessive" | "none" | "warning";
|
|
882
|
+
ratio: number;
|
|
883
|
+
min_count: string;
|
|
884
|
+
min_amount: string;
|
|
885
|
+
min_prior_sales: string;
|
|
886
|
+
source: string;
|
|
887
|
+
};
|
|
886
888
|
export type DriftField = {
|
|
887
889
|
field: string;
|
|
888
890
|
openrails_value: string;
|
|
@@ -898,8 +900,8 @@ export type DunningPolicy = {
|
|
|
898
900
|
tiers: DunningTier[];
|
|
899
901
|
transient_retry_minutes?: number[];
|
|
900
902
|
customer_retries?: number;
|
|
901
|
-
access_during_dunning?:
|
|
902
|
-
access_while_renewal_held?:
|
|
903
|
+
access_during_dunning?: "keep" | "suspend";
|
|
904
|
+
access_while_renewal_held?: "keep" | "suspend";
|
|
903
905
|
};
|
|
904
906
|
export type DunningTier = {
|
|
905
907
|
max_cycle_hours?: number;
|
|
@@ -922,14 +924,16 @@ export type EntitlementCheck = {
|
|
|
922
924
|
entitlements: Record<string, boolean> | null;
|
|
923
925
|
quantities: Record<string, number | null> | null;
|
|
924
926
|
held: Record<string, HeldEntitlements> | null;
|
|
927
|
+
evaluated_at: string | null;
|
|
928
|
+
valid_until: string | null;
|
|
925
929
|
};
|
|
926
930
|
export type EntitlementReplacement = {
|
|
927
931
|
from?: string;
|
|
928
932
|
to?: string;
|
|
929
933
|
};
|
|
930
934
|
export type ErrorDetails = {
|
|
931
|
-
type:
|
|
932
|
-
code:
|
|
935
|
+
type: "api_error" | "authentication_error" | "authorization_error" | "card_error" | "invalid_request_error" | "rate_limit_error";
|
|
936
|
+
code: "alert_email_required" | "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_details_required" | "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" | "event_store_required" | "finding_action_failed" | "finding_not_actionable" | "finding_requires_merchant_config" | "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" | "lease_not_found" | "limit_not_found" | "merchant_config_read_only" | "merchant_mismatch" | "merchant_unit_unsupported" | "merchant_unresolved" | "message_send_failed" | "message_template_invalid" | "meter_in_use" | "meter_rate_card_conflict" | "method_not_allowed" | "metrics_query_invalid" | "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" | "person_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_in_progress" | "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_import_in_progress" | "psp_key_taken" | "psp_last_active" | "psp_not_found" | "psp_probe_limited" | "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_out_of_order" | "usage_rate_card_invalid" | "webhook_account_mismatch" | "webhook_invalid";
|
|
933
937
|
message: string;
|
|
934
938
|
request_id?: string;
|
|
935
939
|
param?: string;
|
|
@@ -957,13 +961,6 @@ export type EventSubject = {
|
|
|
957
961
|
type: string;
|
|
958
962
|
id: string;
|
|
959
963
|
};
|
|
960
|
-
export type ExtendAdmissionBatchParams = {
|
|
961
|
-
items?: ExtendAdmissionParams[];
|
|
962
|
-
};
|
|
963
|
-
export type ExtendAdmissionParams = {
|
|
964
|
-
request_id?: string;
|
|
965
|
-
expires_at?: string;
|
|
966
|
-
};
|
|
967
964
|
export type Finding = {
|
|
968
965
|
id: string;
|
|
969
966
|
finding_type: string;
|
|
@@ -1017,6 +1014,12 @@ export type HeldEntitlements = {
|
|
|
1017
1014
|
keys: string[];
|
|
1018
1015
|
truncated: boolean;
|
|
1019
1016
|
};
|
|
1017
|
+
export type InFlight = {
|
|
1018
|
+
customer_id?: string;
|
|
1019
|
+
limit?: string;
|
|
1020
|
+
unit?: string;
|
|
1021
|
+
amount?: string;
|
|
1022
|
+
};
|
|
1020
1023
|
export type InvoiceContact = {
|
|
1021
1024
|
name: string;
|
|
1022
1025
|
email: string;
|
|
@@ -1029,15 +1032,110 @@ export type InvoiceProfile = {
|
|
|
1029
1032
|
billing_contacts: InvoiceContact[];
|
|
1030
1033
|
memo: string;
|
|
1031
1034
|
};
|
|
1035
|
+
export type Lease = {
|
|
1036
|
+
id: string;
|
|
1037
|
+
expires_at: string;
|
|
1038
|
+
};
|
|
1039
|
+
export type LeaseUsage = {
|
|
1040
|
+
n?: number;
|
|
1041
|
+
customer_id?: string;
|
|
1042
|
+
invoker?: string;
|
|
1043
|
+
invoker_type?: "customer" | "delegated";
|
|
1044
|
+
trust_level?: string | null;
|
|
1045
|
+
roles?: string[];
|
|
1046
|
+
resource?: string | null;
|
|
1047
|
+
currency?: string;
|
|
1048
|
+
source?: string;
|
|
1049
|
+
source_id?: string;
|
|
1050
|
+
outcome?: "failed" | "succeeded";
|
|
1051
|
+
event_type?: string;
|
|
1052
|
+
dimensions?: Record<string, number> | null;
|
|
1053
|
+
metadata?: Record<string, unknown> | null;
|
|
1054
|
+
amount?: string | null;
|
|
1055
|
+
occurred_at?: string;
|
|
1056
|
+
admitted_at?: string | null;
|
|
1057
|
+
};
|
|
1058
|
+
export type LeaseUsageRefusal = {
|
|
1059
|
+
n: number;
|
|
1060
|
+
status: number;
|
|
1061
|
+
error: ErrorDetails | null;
|
|
1062
|
+
};
|
|
1063
|
+
export type LeaseUsageResult = {
|
|
1064
|
+
through_n: number;
|
|
1065
|
+
refused: LeaseUsageRefusal[];
|
|
1066
|
+
};
|
|
1067
|
+
export type Limit = {
|
|
1068
|
+
key: string;
|
|
1069
|
+
unit: string;
|
|
1070
|
+
reset: LimitReset;
|
|
1071
|
+
overrun: "admit_while_positive" | "require_estimate";
|
|
1072
|
+
counts: LimitCount[];
|
|
1073
|
+
products: LimitProduct[];
|
|
1074
|
+
revision: number;
|
|
1075
|
+
created_at: string;
|
|
1076
|
+
updated_at: string;
|
|
1077
|
+
};
|
|
1078
|
+
export type LimitCapacity = {
|
|
1079
|
+
limit: string;
|
|
1080
|
+
capacity: string;
|
|
1081
|
+
};
|
|
1082
|
+
export type LimitCount = {
|
|
1083
|
+
meter: string;
|
|
1084
|
+
weight?: number;
|
|
1085
|
+
per?: number;
|
|
1086
|
+
filter?: Record<string, string[]>;
|
|
1087
|
+
};
|
|
1088
|
+
export type LimitOverride = {
|
|
1089
|
+
inherit?: boolean;
|
|
1090
|
+
limit: string;
|
|
1091
|
+
capacity: string;
|
|
1092
|
+
};
|
|
1093
|
+
export type LimitProduct = {
|
|
1094
|
+
product_id: string;
|
|
1095
|
+
product_key: string;
|
|
1096
|
+
capacity: string;
|
|
1097
|
+
};
|
|
1098
|
+
export type LimitReset = {
|
|
1099
|
+
kind: "billing_period" | "fixed" | "lifetime" | "rate" | "rolling" | "session";
|
|
1100
|
+
window_seconds?: number;
|
|
1101
|
+
anchor?: "first_use" | "subscription";
|
|
1102
|
+
};
|
|
1103
|
+
export type LimitSet = {
|
|
1104
|
+
customer_id: string;
|
|
1105
|
+
currency: string;
|
|
1106
|
+
limits: string[];
|
|
1107
|
+
capacities: LimitCapacity[];
|
|
1108
|
+
credit_line: string;
|
|
1109
|
+
balance_deny_code: "accrual_rate_cap_reached" | "budget_exceeded" | "delegated_spend_not_allowed" | "delinquent_unpaid_order" | "failure_rate_limited" | "insufficient_balance" | "insufficient_credit" | "limit_reached" | "outstanding_cap_reached";
|
|
1110
|
+
refusal: Refusal | null;
|
|
1111
|
+
};
|
|
1032
1112
|
export type LinkPSPImportParams = {
|
|
1033
1113
|
links?: PSPImportLink[];
|
|
1034
1114
|
prices?: PSPImportPriceLink[];
|
|
1035
1115
|
};
|
|
1116
|
+
export type LogEntry = {
|
|
1117
|
+
id: string;
|
|
1118
|
+
occurred_at: string;
|
|
1119
|
+
actor: "file" | "system" | "vault";
|
|
1120
|
+
source: "api" | "catalog_apply" | "cli" | "console" | "customer" | "intent" | "job" | "provider_read" | "reload" | "webhook";
|
|
1121
|
+
object_type: "controls" | "custodian" | "limit" | "merchant" | "messages" | "meter" | "price" | "product" | "psp";
|
|
1122
|
+
object_id: string;
|
|
1123
|
+
action: "archive" | "create" | "delete" | "key_add" | "key_remove" | "key_rename" | "move" | "unarchive" | "update";
|
|
1124
|
+
changes: unknown | null;
|
|
1125
|
+
reason: string | null;
|
|
1126
|
+
request_id: string | null;
|
|
1127
|
+
operation_id: string | null;
|
|
1128
|
+
};
|
|
1036
1129
|
export type LowBalanceLine = {
|
|
1037
1130
|
currency: string;
|
|
1038
1131
|
amount: string | null;
|
|
1039
1132
|
runway_hours: number | null;
|
|
1040
1133
|
};
|
|
1134
|
+
export type MRRRisk = {
|
|
1135
|
+
reasons: ("card_expiring" | "delinquent" | "needs_payment_method" | "past_due" | "unverified")[];
|
|
1136
|
+
entry_reason: "card_expiring" | "delinquent" | "needs_payment_method" | "past_due" | "unverified";
|
|
1137
|
+
since: string;
|
|
1138
|
+
};
|
|
1041
1139
|
export type Mandate = {
|
|
1042
1140
|
id: string;
|
|
1043
1141
|
customer_id: string;
|
|
@@ -1047,7 +1145,7 @@ export type Mandate = {
|
|
|
1047
1145
|
subscription_id: string | null;
|
|
1048
1146
|
currency: string | null;
|
|
1049
1147
|
status: "active" | "ended" | "requires_reconsent" | "revoked";
|
|
1050
|
-
end_reason: "brand_changed" | "closed" | "customer_revoked" | "payment_method_removed" | "replaced" | "subscription_ended" | null;
|
|
1148
|
+
end_reason: "brand_changed" | "closed" | "customer_revoked" | "disputed" | "payment_method_removed" | "replaced" | "subscription_ended" | null;
|
|
1051
1149
|
ended_at: string | null;
|
|
1052
1150
|
card_brand: string | null;
|
|
1053
1151
|
initial_transaction_id: string | null;
|
|
@@ -1067,31 +1165,38 @@ export type MatrixCell = {
|
|
|
1067
1165
|
};
|
|
1068
1166
|
export type MerchantCheckoutSettings = {
|
|
1069
1167
|
embed_origins?: string[];
|
|
1168
|
+
billing_fields?: BillingFieldSettings;
|
|
1070
1169
|
};
|
|
1071
1170
|
export type MerchantConfigurationState = {
|
|
1072
1171
|
revision: number;
|
|
1073
1172
|
display_name: string;
|
|
1074
1173
|
usage_billing?: UsageBillingSettings;
|
|
1075
1174
|
profile?: MerchantProfile;
|
|
1076
|
-
collection_threshold?: string;
|
|
1077
|
-
monthly_floor?: string;
|
|
1078
1175
|
billing_period_boundary?: string;
|
|
1079
1176
|
alert_email?: string;
|
|
1080
1177
|
reprice_notice_window_days?: number;
|
|
1081
|
-
provider_refund_access?:
|
|
1178
|
+
provider_refund_access?: "keep" | "revoke_on_any" | "revoke_on_full";
|
|
1179
|
+
fraud_warning_refund?: "record" | "refund";
|
|
1082
1180
|
arrears_grace_days?: number;
|
|
1083
|
-
arrears_delinquency_floor?: string;
|
|
1084
1181
|
psp_routing?: PSPRoutingRule[];
|
|
1085
1182
|
dunning_policy?: DunningPolicy;
|
|
1086
1183
|
checkout?: MerchantCheckoutSettings;
|
|
1087
1184
|
balance_notices?: BalanceNoticeSettings;
|
|
1185
|
+
accounting?: AccountingSettings;
|
|
1088
1186
|
card_vault?: string;
|
|
1089
1187
|
charge_psps?: string[];
|
|
1090
1188
|
billing_policies?: BillingPolicy[];
|
|
1091
1189
|
billing_policy_bindings?: BillingPolicyBinding[];
|
|
1092
1190
|
delegated_invoker_wasted_spend_limits?: BudgetWindow[];
|
|
1191
|
+
currencies?: MerchantCurrency[];
|
|
1093
1192
|
platform_vault: PlatformVaultState;
|
|
1094
1193
|
};
|
|
1194
|
+
export type MerchantCurrency = {
|
|
1195
|
+
code: string;
|
|
1196
|
+
name: string;
|
|
1197
|
+
symbol?: string;
|
|
1198
|
+
scale: number;
|
|
1199
|
+
};
|
|
1095
1200
|
export type MerchantProfile = {
|
|
1096
1201
|
logo_url?: string;
|
|
1097
1202
|
from_email?: string;
|
|
@@ -1102,6 +1207,18 @@ export type MerchantProfile = {
|
|
|
1102
1207
|
privacy_url?: string;
|
|
1103
1208
|
statement_descriptor?: string;
|
|
1104
1209
|
};
|
|
1210
|
+
export type MessagePreview = {
|
|
1211
|
+
event_type: string;
|
|
1212
|
+
language: string;
|
|
1213
|
+
subject: string;
|
|
1214
|
+
text: string | null;
|
|
1215
|
+
html: string | null;
|
|
1216
|
+
};
|
|
1217
|
+
export type MessageTemplate = {
|
|
1218
|
+
subject?: string;
|
|
1219
|
+
html?: string;
|
|
1220
|
+
text?: string;
|
|
1221
|
+
};
|
|
1105
1222
|
export type Meter = {
|
|
1106
1223
|
key: string;
|
|
1107
1224
|
event_type: string;
|
|
@@ -1144,7 +1261,7 @@ export type MetricsDimension = {
|
|
|
1144
1261
|
};
|
|
1145
1262
|
export type MetricsExample = {
|
|
1146
1263
|
intent: string;
|
|
1147
|
-
query:
|
|
1264
|
+
query: QueryMetricsParams;
|
|
1148
1265
|
};
|
|
1149
1266
|
export type MetricsLimits = {
|
|
1150
1267
|
max_buckets: number;
|
|
@@ -1154,33 +1271,31 @@ export type MetricsMeasure = {
|
|
|
1154
1271
|
name: string;
|
|
1155
1272
|
class: string;
|
|
1156
1273
|
unit: string;
|
|
1274
|
+
group: string;
|
|
1275
|
+
direction: string;
|
|
1276
|
+
thresholds: MetricsThreshold[];
|
|
1157
1277
|
description: string;
|
|
1158
1278
|
formula: string;
|
|
1159
1279
|
dims: string[];
|
|
1280
|
+
dim_values?: Record<string, string[]>;
|
|
1160
1281
|
money?: boolean;
|
|
1282
|
+
utc_days?: boolean;
|
|
1283
|
+
program?: "acquirer" | "mastercard_ecp" | "mastercard_efm" | "stripe" | "visa_vamp";
|
|
1161
1284
|
};
|
|
1162
1285
|
export type MetricsOrder = {
|
|
1163
1286
|
measure?: string;
|
|
1164
1287
|
dimension?: string;
|
|
1165
1288
|
dir?: string;
|
|
1166
1289
|
};
|
|
1167
|
-
export type MetricsQuery = {
|
|
1168
|
-
measures: string[];
|
|
1169
|
-
by: string[];
|
|
1170
|
-
grain: string;
|
|
1171
|
-
range: MetricsRange | null;
|
|
1172
|
-
filters: Record<string, string[]> | null;
|
|
1173
|
-
order: MetricsOrder[];
|
|
1174
|
-
limit: number | null;
|
|
1175
|
-
compare: string;
|
|
1176
|
-
};
|
|
1177
1290
|
export type MetricsRange = {
|
|
1178
1291
|
from?: string;
|
|
1179
1292
|
to?: string;
|
|
1180
1293
|
last?: string;
|
|
1294
|
+
next?: string;
|
|
1181
1295
|
};
|
|
1182
1296
|
export type MetricsResult = {
|
|
1183
1297
|
grain?: string;
|
|
1298
|
+
timezone: string;
|
|
1184
1299
|
range: MetricsResultRange;
|
|
1185
1300
|
columns: MetricsColumn[];
|
|
1186
1301
|
rows: unknown[][];
|
|
@@ -1201,14 +1316,15 @@ export type MetricsSchema = {
|
|
|
1201
1316
|
limits: MetricsLimits;
|
|
1202
1317
|
query_shape: string;
|
|
1203
1318
|
};
|
|
1319
|
+
export type MetricsThreshold = {
|
|
1320
|
+
value: number;
|
|
1321
|
+
label: string;
|
|
1322
|
+
from?: string;
|
|
1323
|
+
until?: string;
|
|
1324
|
+
};
|
|
1204
1325
|
export type MyOrderPayURLParams = {
|
|
1205
1326
|
embedded?: boolean;
|
|
1206
1327
|
};
|
|
1207
|
-
export type NewPriceDraft = {
|
|
1208
|
-
product_key: string;
|
|
1209
|
-
review_text: string;
|
|
1210
|
-
create_price: CreatePriceParams;
|
|
1211
|
-
};
|
|
1212
1328
|
export type NextAction = {
|
|
1213
1329
|
type: string;
|
|
1214
1330
|
url: string | null;
|
|
@@ -1246,6 +1362,29 @@ export type Order = {
|
|
|
1246
1362
|
voided_at: string | null;
|
|
1247
1363
|
uncollectible_at: string | null;
|
|
1248
1364
|
created_at: string;
|
|
1365
|
+
checkout: OrderCheckout | null;
|
|
1366
|
+
};
|
|
1367
|
+
export type OrderAttribution = {
|
|
1368
|
+
source: string | null;
|
|
1369
|
+
medium: string | null;
|
|
1370
|
+
campaign: string | null;
|
|
1371
|
+
term: string | null;
|
|
1372
|
+
content: string | null;
|
|
1373
|
+
referrer: string | null;
|
|
1374
|
+
affiliate: string | null;
|
|
1375
|
+
};
|
|
1376
|
+
export type OrderCheckout = {
|
|
1377
|
+
customer_type: "new" | "reactivated" | "returning";
|
|
1378
|
+
purchase_number: number;
|
|
1379
|
+
opened_at: string | null;
|
|
1380
|
+
submitted_at: string | null;
|
|
1381
|
+
country: string | null;
|
|
1382
|
+
country_source: "billing_address" | "card" | "ip" | null;
|
|
1383
|
+
billing_country: string | null;
|
|
1384
|
+
card_country: string | null;
|
|
1385
|
+
ip_country: string | null;
|
|
1386
|
+
language: string | null;
|
|
1387
|
+
attribution: OrderAttribution;
|
|
1249
1388
|
};
|
|
1250
1389
|
export type OrderLine = {
|
|
1251
1390
|
id: string;
|
|
@@ -1303,7 +1442,7 @@ export type OrderPaymentAttempt = {
|
|
|
1303
1442
|
export type OrderPaymentOption = {
|
|
1304
1443
|
saved_payment_method_ids?: string[];
|
|
1305
1444
|
psp_id: string;
|
|
1306
|
-
rail:
|
|
1445
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1307
1446
|
accepts: string[];
|
|
1308
1447
|
failed_attempts: number;
|
|
1309
1448
|
requires?: string[];
|
|
@@ -1348,6 +1487,7 @@ export type OrderRenewal = {
|
|
|
1348
1487
|
period_starts_at: string;
|
|
1349
1488
|
period_ends_at: string;
|
|
1350
1489
|
due_at: string;
|
|
1490
|
+
checkout_order_id: string | null;
|
|
1351
1491
|
};
|
|
1352
1492
|
export type OrderUsage = {
|
|
1353
1493
|
period_starts_at: string;
|
|
@@ -1367,7 +1507,7 @@ export type PSP = {
|
|
|
1367
1507
|
id: string;
|
|
1368
1508
|
key: string;
|
|
1369
1509
|
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1370
|
-
environment:
|
|
1510
|
+
environment: "devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet";
|
|
1371
1511
|
archived: boolean;
|
|
1372
1512
|
open_obligations: number;
|
|
1373
1513
|
gateway_id?: string;
|
|
@@ -1393,7 +1533,7 @@ export type PSPCredential = {
|
|
|
1393
1533
|
export type PSPImport = {
|
|
1394
1534
|
id: string;
|
|
1395
1535
|
psp: string;
|
|
1396
|
-
rail:
|
|
1536
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1397
1537
|
status: "applied" | "applying" | "failed" | "pulled" | "pulling";
|
|
1398
1538
|
history_since: string | null;
|
|
1399
1539
|
history_through: string | null;
|
|
@@ -1465,13 +1605,13 @@ export type PSPImportRule = {
|
|
|
1465
1605
|
export type PSPPaymentConfig = {
|
|
1466
1606
|
psp_id: string;
|
|
1467
1607
|
key: string;
|
|
1468
|
-
rail:
|
|
1608
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1469
1609
|
custodian: string;
|
|
1470
1610
|
display_name: string;
|
|
1471
1611
|
flow: string;
|
|
1472
1612
|
routed: boolean;
|
|
1473
1613
|
config?: Record<string, string>;
|
|
1474
|
-
status?:
|
|
1614
|
+
status?: "temporarily_unavailable";
|
|
1475
1615
|
retry_after?: number;
|
|
1476
1616
|
};
|
|
1477
1617
|
export type PSPRef = {
|
|
@@ -1510,7 +1650,7 @@ export type PackagePrice = {
|
|
|
1510
1650
|
export type ParkedSubscription = {
|
|
1511
1651
|
id: string;
|
|
1512
1652
|
psp: string;
|
|
1513
|
-
rail:
|
|
1653
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1514
1654
|
subscription_ref: string;
|
|
1515
1655
|
reason: "customer_unlinked" | "price_unmapped" | "product_held";
|
|
1516
1656
|
price_ref: string | null;
|
|
@@ -1541,13 +1681,14 @@ export type Payment = {
|
|
|
1541
1681
|
order_id: string | null;
|
|
1542
1682
|
quantity: number | null;
|
|
1543
1683
|
channel: "manual" | "rail";
|
|
1544
|
-
rail:
|
|
1684
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe" | null;
|
|
1545
1685
|
psp_id: string | null;
|
|
1546
1686
|
transaction_id: string;
|
|
1547
1687
|
card: CardDetails | null;
|
|
1548
1688
|
failure: PaymentFailure | null;
|
|
1549
1689
|
refunded_payment_id: string | null;
|
|
1550
1690
|
reason: string | null;
|
|
1691
|
+
refund_reason: "charged_after_cancel" | "dispute_prevention" | "duplicate" | "fraud_warning" | "fraudulent" | "other" | "requested_by_customer" | "unknown" | null;
|
|
1551
1692
|
refunds: Payment[];
|
|
1552
1693
|
created_at: string;
|
|
1553
1694
|
};
|
|
@@ -1558,20 +1699,23 @@ export type PaymentAttempt = {
|
|
|
1558
1699
|
card_entry: string;
|
|
1559
1700
|
source: string;
|
|
1560
1701
|
observed_via: string;
|
|
1561
|
-
|
|
1562
|
-
|
|
1702
|
+
outcome: "approved" | "declined" | "error" | "refused";
|
|
1703
|
+
decline_cause: "customer" | "fraud" | "issuer" | "merchant" | "processing" | "unknown";
|
|
1704
|
+
reason: "authentication_required" | "blocked_by_psp" | "brand_not_accepted" | "call_issuer" | "card_not_supported" | "communication_error" | "currency_not_supported" | "do_not_honor" | "duplicate_transaction" | "expired_card" | "fraudulent" | "gateway_rejected" | "generic_decline" | "incorrect_address" | "incorrect_cvc" | "incorrect_number" | "incorrect_zip" | "insufficient_funds" | "invalid_account" | "invalid_expiry" | "invalid_pin" | "invalid_request" | "issuer_unavailable" | "lost_card" | "merchant_config" | "no_such_issuer" | "over_limit" | "payment_page_expired" | "pickup_card" | "processing_error" | "restricted_card" | "retry_later" | "security_violation" | "stolen_card" | "stop_recurring" | "stored_credential_required" | "suspected_fraud" | "transaction_not_allowed" | "try_again_later" | "unknown" | "update_cardholder_data";
|
|
1563
1705
|
action: string;
|
|
1564
1706
|
response_code: string;
|
|
1565
1707
|
response_text: string;
|
|
1566
1708
|
issuer_code: string;
|
|
1567
1709
|
issuer_text: string;
|
|
1710
|
+
advice_code: string;
|
|
1711
|
+
network_advice_code: string;
|
|
1568
1712
|
avs_result: string;
|
|
1569
1713
|
cvv_result: string;
|
|
1570
1714
|
card: CardDetails | null;
|
|
1571
1715
|
card_bin: string;
|
|
1572
1716
|
token_type: string;
|
|
1573
1717
|
transaction_id: string;
|
|
1574
|
-
rail:
|
|
1718
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1575
1719
|
psp_id: string;
|
|
1576
1720
|
customer_id: string;
|
|
1577
1721
|
amount: string;
|
|
@@ -1587,19 +1731,20 @@ export type PaymentAttempt = {
|
|
|
1587
1731
|
};
|
|
1588
1732
|
export type PaymentConfig = {
|
|
1589
1733
|
psps: PSPPaymentConfig[];
|
|
1734
|
+
billing_fields: BillingFieldSettings;
|
|
1590
1735
|
solana: SolanaPaymentConfig | null;
|
|
1591
1736
|
};
|
|
1592
1737
|
export type PaymentFailure = {
|
|
1593
|
-
reason:
|
|
1738
|
+
reason: "authentication_required" | "blocked_by_psp" | "brand_not_accepted" | "call_issuer" | "card_not_supported" | "communication_error" | "currency_not_supported" | "do_not_honor" | "duplicate_transaction" | "expired_card" | "fraudulent" | "gateway_rejected" | "generic_decline" | "incorrect_address" | "incorrect_cvc" | "incorrect_number" | "incorrect_zip" | "insufficient_funds" | "invalid_account" | "invalid_expiry" | "invalid_pin" | "invalid_request" | "issuer_unavailable" | "lost_card" | "merchant_config" | "no_such_issuer" | "over_limit" | "payment_page_expired" | "pickup_card" | "processing_error" | "restricted_card" | "retry_later" | "security_violation" | "stolen_card" | "stop_recurring" | "stored_credential_required" | "suspected_fraud" | "transaction_not_allowed" | "try_again_later" | "unknown" | "update_cardholder_data";
|
|
1594
1739
|
message: string;
|
|
1595
|
-
field?:
|
|
1740
|
+
field?: "cvc" | "expiry" | "number" | "postal_code";
|
|
1596
1741
|
};
|
|
1597
1742
|
export type PaymentMethod = {
|
|
1598
1743
|
id: string;
|
|
1599
1744
|
customer_id: string;
|
|
1600
|
-
rail:
|
|
1745
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1601
1746
|
psp_id: string | null;
|
|
1602
|
-
status: "active" | "closed" | "removed" | "replaced" | "requires_action";
|
|
1747
|
+
status: "active" | "closed" | "disputed" | "removed" | "replaced" | "requires_action";
|
|
1603
1748
|
next_action: NextAction | null;
|
|
1604
1749
|
replaced_by: string | null;
|
|
1605
1750
|
card: CardDetails | null;
|
|
@@ -1619,7 +1764,7 @@ export type PaymentMethodHealth = {
|
|
|
1619
1764
|
active: boolean;
|
|
1620
1765
|
};
|
|
1621
1766
|
export type PaymentMethodRef = {
|
|
1622
|
-
rail?:
|
|
1767
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1623
1768
|
rail_customer_ref?: string;
|
|
1624
1769
|
rail_method_ref?: string;
|
|
1625
1770
|
};
|
|
@@ -1629,7 +1774,7 @@ export type PaymentMethodSubscription = {
|
|
|
1629
1774
|
created_at: string;
|
|
1630
1775
|
};
|
|
1631
1776
|
export type PaymentRecovery = {
|
|
1632
|
-
last_failure_reason?:
|
|
1777
|
+
last_failure_reason?: "authentication_required" | "blocked_by_psp" | "brand_not_accepted" | "call_issuer" | "card_not_supported" | "communication_error" | "currency_not_supported" | "do_not_honor" | "duplicate_transaction" | "expired_card" | "fraudulent" | "gateway_rejected" | "generic_decline" | "incorrect_address" | "incorrect_cvc" | "incorrect_number" | "incorrect_zip" | "insufficient_funds" | "invalid_account" | "invalid_expiry" | "invalid_pin" | "invalid_request" | "issuer_unavailable" | "lost_card" | "merchant_config" | "no_such_issuer" | "over_limit" | "payment_page_expired" | "pickup_card" | "processing_error" | "restricted_card" | "retry_later" | "security_violation" | "stolen_card" | "stop_recurring" | "stored_credential_required" | "suspected_fraud" | "transaction_not_allowed" | "try_again_later" | "unknown" | "update_cardholder_data";
|
|
1633
1778
|
retryable: boolean;
|
|
1634
1779
|
blocked_reason?: string;
|
|
1635
1780
|
order_id?: string;
|
|
@@ -1644,6 +1789,11 @@ export type PerUnitPrice = {
|
|
|
1644
1789
|
export type PlatformVaultState = {
|
|
1645
1790
|
available: boolean;
|
|
1646
1791
|
};
|
|
1792
|
+
export type PreviewMessageParams = {
|
|
1793
|
+
event_type?: string;
|
|
1794
|
+
language?: string;
|
|
1795
|
+
template?: MessageTemplate | null;
|
|
1796
|
+
};
|
|
1647
1797
|
export type PreviewMyOrderParams = {
|
|
1648
1798
|
lines?: OrderLineParams[];
|
|
1649
1799
|
cart?: boolean;
|
|
@@ -1677,22 +1827,17 @@ export type Price = {
|
|
|
1677
1827
|
billing_interval_months: number | null;
|
|
1678
1828
|
trial_unit_amount: string | null;
|
|
1679
1829
|
trial_duration_hours: number | null;
|
|
1680
|
-
sell_via:
|
|
1830
|
+
sell_via: ("card" | "solana")[];
|
|
1681
1831
|
provider: PriceProvider | null;
|
|
1682
1832
|
solana_plan: string | null;
|
|
1683
1833
|
created_at: string;
|
|
1684
1834
|
updated_at: string;
|
|
1685
1835
|
};
|
|
1686
|
-
export type
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
currency: string;
|
|
1692
|
-
affected_count: number;
|
|
1693
|
-
review_text: string;
|
|
1694
|
-
create_price: CreatePriceParams;
|
|
1695
|
-
migration: CreatePriceMigrationParams | null;
|
|
1836
|
+
export type PriceBound = {
|
|
1837
|
+
meter: string;
|
|
1838
|
+
cell: string | null;
|
|
1839
|
+
unit_amount: string;
|
|
1840
|
+
divide_by: string;
|
|
1696
1841
|
};
|
|
1697
1842
|
export type PriceKeyMovement = {
|
|
1698
1843
|
effective_at: string;
|
|
@@ -1715,6 +1860,8 @@ export type PriceMigration = {
|
|
|
1715
1860
|
blocked: number;
|
|
1716
1861
|
created_at: string;
|
|
1717
1862
|
canceled_at: string | null;
|
|
1863
|
+
preparing: boolean;
|
|
1864
|
+
warnings: string[];
|
|
1718
1865
|
};
|
|
1719
1866
|
export type PriceMigrationCancel = {
|
|
1720
1867
|
price_migration: PriceMigration;
|
|
@@ -1723,7 +1870,7 @@ export type PriceMigrationCancel = {
|
|
|
1723
1870
|
};
|
|
1724
1871
|
export type PriceMigrationOutcome = {
|
|
1725
1872
|
subscription_id: string;
|
|
1726
|
-
rail:
|
|
1873
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1727
1874
|
disposition: "blocked" | "scheduled" | "skipped";
|
|
1728
1875
|
reason: string | null;
|
|
1729
1876
|
};
|
|
@@ -1731,6 +1878,7 @@ export type PriceMigrationPreview = {
|
|
|
1731
1878
|
to_price_id: string | null;
|
|
1732
1879
|
effective_at: string;
|
|
1733
1880
|
matched: number;
|
|
1881
|
+
classified: number;
|
|
1734
1882
|
scheduled: number;
|
|
1735
1883
|
skipped: number;
|
|
1736
1884
|
blocked: number;
|
|
@@ -1746,7 +1894,7 @@ export type PriceProvider = {
|
|
|
1746
1894
|
access_duration_default: boolean;
|
|
1747
1895
|
psp: string;
|
|
1748
1896
|
psp_id: string;
|
|
1749
|
-
rail:
|
|
1897
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1750
1898
|
ids: Record<string, string> | null;
|
|
1751
1899
|
retired: boolean;
|
|
1752
1900
|
sync_status: "drifted" | "in_sync" | "missing" | "sync_disabled" | "unknown";
|
|
@@ -1800,7 +1948,7 @@ export type ProductSummary = {
|
|
|
1800
1948
|
archived: boolean;
|
|
1801
1949
|
};
|
|
1802
1950
|
export type ProposalError = {
|
|
1803
|
-
code:
|
|
1951
|
+
code: "alert_email_required" | "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_details_required" | "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" | "event_store_required" | "finding_action_failed" | "finding_not_actionable" | "finding_requires_merchant_config" | "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" | "lease_not_found" | "limit_not_found" | "merchant_config_read_only" | "merchant_mismatch" | "merchant_unit_unsupported" | "merchant_unresolved" | "message_send_failed" | "message_template_invalid" | "meter_in_use" | "meter_rate_card_conflict" | "method_not_allowed" | "metrics_query_invalid" | "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" | "person_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_in_progress" | "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_import_in_progress" | "psp_key_taken" | "psp_last_active" | "psp_not_found" | "psp_probe_limited" | "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_out_of_order" | "usage_rate_card_invalid" | "webhook_account_mismatch" | "webhook_invalid";
|
|
1804
1952
|
message: string;
|
|
1805
1953
|
};
|
|
1806
1954
|
export type ProposalResult = {
|
|
@@ -1848,6 +1996,7 @@ export type PublicConfig = {
|
|
|
1848
1996
|
currencies: CurrencyUnits[];
|
|
1849
1997
|
rails: RailDefinition[];
|
|
1850
1998
|
captcha: CaptchaConfig | null;
|
|
1999
|
+
usage: boolean;
|
|
1851
2000
|
};
|
|
1852
2001
|
export type PublicMerchant = {
|
|
1853
2002
|
display_name: string;
|
|
@@ -1858,25 +2007,27 @@ export type PublicMerchant = {
|
|
|
1858
2007
|
statement_descriptor: string | null;
|
|
1859
2008
|
embed_origins: string[];
|
|
1860
2009
|
};
|
|
1861
|
-
export type PutCustodianParams = {
|
|
1862
|
-
expected_revision?: number;
|
|
1863
|
-
kind?: string;
|
|
1864
|
-
environment?: string;
|
|
1865
|
-
account_id?: string;
|
|
1866
|
-
settings?: Record<string, unknown>;
|
|
1867
|
-
credentials?: Record<string, string>;
|
|
1868
|
-
};
|
|
1869
2010
|
export type Quantity = {
|
|
1870
2011
|
min: number;
|
|
1871
2012
|
max: number;
|
|
1872
2013
|
};
|
|
2014
|
+
export type QueryMetricsParams = {
|
|
2015
|
+
measures: string[];
|
|
2016
|
+
by: string[];
|
|
2017
|
+
grain: string;
|
|
2018
|
+
range: MetricsRange | null;
|
|
2019
|
+
filters: Record<string, string[]> | null;
|
|
2020
|
+
order: MetricsOrder[];
|
|
2021
|
+
limit: number | null;
|
|
2022
|
+
compare: string;
|
|
2023
|
+
};
|
|
1873
2024
|
export type RailDefinition = {
|
|
1874
2025
|
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1875
2026
|
display_name: string;
|
|
1876
2027
|
account_fields: string[];
|
|
1877
2028
|
fields: string[];
|
|
1878
2029
|
credential_keys: string[];
|
|
1879
|
-
environments:
|
|
2030
|
+
environments: ("devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet")[];
|
|
1880
2031
|
};
|
|
1881
2032
|
export type RateCard = {
|
|
1882
2033
|
ordinal?: number;
|
|
@@ -1905,42 +2056,28 @@ export type RecordExternalPaymentParams = {
|
|
|
1905
2056
|
transaction_id?: string;
|
|
1906
2057
|
paid_at?: string;
|
|
1907
2058
|
};
|
|
1908
|
-
export type RecordUsageBatchParams = {
|
|
1909
|
-
items?: RecordUsageParams[];
|
|
1910
|
-
};
|
|
1911
|
-
export type RecordUsageBatchResult = {
|
|
1912
|
-
items: UsageEventResult[];
|
|
1913
|
-
};
|
|
1914
|
-
export type RecordUsageParams = {
|
|
1915
|
-
customer_id?: string;
|
|
1916
|
-
invoker?: string;
|
|
1917
|
-
invoker_type?: "customer" | "delegated";
|
|
1918
|
-
currency?: string;
|
|
1919
|
-
event_type?: string;
|
|
1920
|
-
dimensions?: Record<string, number>;
|
|
1921
|
-
amount?: string;
|
|
1922
|
-
outcome?: "failed" | "succeeded";
|
|
1923
|
-
resource?: string;
|
|
1924
|
-
metadata?: Record<string, unknown>;
|
|
1925
|
-
source?: string;
|
|
1926
|
-
source_id?: string;
|
|
1927
|
-
occurred_at?: string;
|
|
1928
|
-
};
|
|
1929
2059
|
export type RefundPaymentParams = {
|
|
1930
2060
|
amount?: string;
|
|
1931
2061
|
full?: boolean;
|
|
1932
2062
|
reason?: string;
|
|
2063
|
+
refund_reason?: "charged_after_cancel" | "dispute_prevention" | "duplicate" | "fraud_warning" | "fraudulent" | "other" | "requested_by_customer" | "unknown";
|
|
1933
2064
|
revoke_access?: boolean;
|
|
1934
2065
|
};
|
|
1935
|
-
export type
|
|
1936
|
-
|
|
2066
|
+
export type Refusal = {
|
|
2067
|
+
deny_code: "accrual_rate_cap_reached" | "budget_exceeded" | "delegated_spend_not_allowed" | "delinquent_unpaid_order" | "failure_rate_limited" | "insufficient_balance" | "insufficient_credit" | "limit_reached" | "outstanding_cap_reached";
|
|
2068
|
+
limit: string | null;
|
|
2069
|
+
resets_at: string | null;
|
|
2070
|
+
retry_after_seconds: number | null;
|
|
2071
|
+
};
|
|
2072
|
+
export type ReinstateCreditGrantParams = {
|
|
2073
|
+
reason?: string;
|
|
1937
2074
|
};
|
|
1938
2075
|
export type Renewal = {
|
|
1939
2076
|
id: string;
|
|
1940
2077
|
subscription_id: string;
|
|
1941
2078
|
customer_id: string;
|
|
1942
2079
|
psp_id: string;
|
|
1943
|
-
rail:
|
|
2080
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1944
2081
|
owner: string;
|
|
1945
2082
|
due_at: string;
|
|
1946
2083
|
amount: string;
|
|
@@ -1995,16 +2132,36 @@ export type ScheduledChange = {
|
|
|
1995
2132
|
price?: Price;
|
|
1996
2133
|
product?: ProductSummary;
|
|
1997
2134
|
};
|
|
2135
|
+
export type ScheduledMRR = {
|
|
2136
|
+
kind: "churn" | "contraction" | "expansion";
|
|
2137
|
+
amount: string;
|
|
2138
|
+
effective_at: string;
|
|
2139
|
+
};
|
|
1998
2140
|
export type SetCartLineParams = {
|
|
1999
2141
|
quantity?: number;
|
|
2000
2142
|
amount?: string;
|
|
2001
2143
|
};
|
|
2144
|
+
export type SetCustodianParams = {
|
|
2145
|
+
expected_revision?: number;
|
|
2146
|
+
kind?: "basis_theory" | "hyperswitch";
|
|
2147
|
+
environment?: "devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet";
|
|
2148
|
+
account_id?: string;
|
|
2149
|
+
settings?: Record<string, unknown>;
|
|
2150
|
+
credentials?: Record<string, string>;
|
|
2151
|
+
};
|
|
2002
2152
|
export type SetDashboardParams = {
|
|
2003
2153
|
widgets?: DashboardWidget[];
|
|
2004
2154
|
};
|
|
2005
2155
|
export type SetDefaultPaymentMethodParams = {
|
|
2006
2156
|
payment_method_id?: string;
|
|
2007
2157
|
};
|
|
2158
|
+
export type SetLimitParams = {
|
|
2159
|
+
unit?: string;
|
|
2160
|
+
reset?: LimitReset;
|
|
2161
|
+
overrun?: "admit_while_positive" | "require_estimate";
|
|
2162
|
+
counts?: LimitCount[];
|
|
2163
|
+
expected_revision?: number;
|
|
2164
|
+
};
|
|
2008
2165
|
export type SetLowBalanceLineParams = {
|
|
2009
2166
|
amount?: string | null;
|
|
2010
2167
|
runway_hours?: number | null;
|
|
@@ -2076,8 +2233,10 @@ export type Subscription = {
|
|
|
2076
2233
|
product_id: string;
|
|
2077
2234
|
price_id: string;
|
|
2078
2235
|
quantity: number | null;
|
|
2236
|
+
mrr: SubscriptionMRR | null;
|
|
2237
|
+
mrr_risk: MRRRisk | null;
|
|
2079
2238
|
psp_id: string;
|
|
2080
|
-
rail:
|
|
2239
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2081
2240
|
rail_subscription_id: string | null;
|
|
2082
2241
|
status: "active" | "awaiting_method" | "canceled" | "past_due" | "pending" | "unverified";
|
|
2083
2242
|
scheduled_change: ScheduledChange | null;
|
|
@@ -2108,7 +2267,7 @@ export type SubscriptionAccess = {
|
|
|
2108
2267
|
source_type?: string;
|
|
2109
2268
|
source_id?: string;
|
|
2110
2269
|
subscription_id?: string;
|
|
2111
|
-
rail?:
|
|
2270
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2112
2271
|
starts_at: string;
|
|
2113
2272
|
ends_at?: string;
|
|
2114
2273
|
};
|
|
@@ -2117,7 +2276,7 @@ export type SubscriptionChange = {
|
|
|
2117
2276
|
effective?: string;
|
|
2118
2277
|
price_id: string;
|
|
2119
2278
|
quantity: number | null;
|
|
2120
|
-
rail:
|
|
2279
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2121
2280
|
subscription_id?: string;
|
|
2122
2281
|
next_action?: NextAction;
|
|
2123
2282
|
transaction_id: string | null;
|
|
@@ -2137,7 +2296,7 @@ export type SubscriptionChangePreview = {
|
|
|
2137
2296
|
effective: string;
|
|
2138
2297
|
price_id: string;
|
|
2139
2298
|
quantity: number | null;
|
|
2140
|
-
rail:
|
|
2299
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2141
2300
|
currency: string;
|
|
2142
2301
|
amount_due_now: string;
|
|
2143
2302
|
next_charge_amount: string;
|
|
@@ -2153,7 +2312,7 @@ export type SubscriptionDunning = {
|
|
|
2153
2312
|
next_retry_at: string | null;
|
|
2154
2313
|
final_retry_at: string | null;
|
|
2155
2314
|
waiting_for_new_card: boolean;
|
|
2156
|
-
last_failure_reason: "authentication_required" | "blocked_by_psp" | "call_issuer" | "card_not_supported" | "communication_error" | "currency_not_supported" | "do_not_honor" | "duplicate_transaction" | "expired_card" | "fraudulent" | "gateway_rejected" | "generic_decline" | "incorrect_address" | "incorrect_cvc" | "incorrect_number" | "incorrect_zip" | "insufficient_funds" | "invalid_account" | "invalid_expiry" | "invalid_pin" | "invalid_request" | "issuer_unavailable" | "lost_card" | "merchant_config" | "no_such_issuer" | "over_limit" | "pickup_card" | "processing_error" | "restricted_card" | "retry_later" | "security_violation" | "stolen_card" | "stop_recurring" | "transaction_not_allowed" | "try_again_later" | "unknown" | "update_cardholder_data" | null;
|
|
2315
|
+
last_failure_reason: "authentication_required" | "blocked_by_psp" | "brand_not_accepted" | "call_issuer" | "card_not_supported" | "communication_error" | "currency_not_supported" | "do_not_honor" | "duplicate_transaction" | "expired_card" | "fraudulent" | "gateway_rejected" | "generic_decline" | "incorrect_address" | "incorrect_cvc" | "incorrect_number" | "incorrect_zip" | "insufficient_funds" | "invalid_account" | "invalid_expiry" | "invalid_pin" | "invalid_request" | "issuer_unavailable" | "lost_card" | "merchant_config" | "no_such_issuer" | "over_limit" | "payment_page_expired" | "pickup_card" | "processing_error" | "restricted_card" | "retry_later" | "security_violation" | "stolen_card" | "stop_recurring" | "stored_credential_required" | "suspected_fraud" | "transaction_not_allowed" | "try_again_later" | "unknown" | "update_cardholder_data" | null;
|
|
2157
2316
|
};
|
|
2158
2317
|
export type SubscriptionHistory = {
|
|
2159
2318
|
events: ListPage<SubscriptionHistoryEntry>;
|
|
@@ -2162,7 +2321,8 @@ export type SubscriptionHistory = {
|
|
|
2162
2321
|
export type SubscriptionHistoryAttempt = {
|
|
2163
2322
|
id: string;
|
|
2164
2323
|
kind: string;
|
|
2165
|
-
|
|
2324
|
+
outcome: "approved" | "declined" | "error" | "refused";
|
|
2325
|
+
decline_cause?: "customer" | "fraud" | "issuer" | "merchant" | "processing" | "unknown";
|
|
2166
2326
|
reason?: string;
|
|
2167
2327
|
action?: string;
|
|
2168
2328
|
source: string;
|
|
@@ -2228,11 +2388,36 @@ export type SubscriptionHistoryTransition = {
|
|
|
2228
2388
|
from_period_end: string | null;
|
|
2229
2389
|
to_period_end: string | null;
|
|
2230
2390
|
};
|
|
2391
|
+
export type SubscriptionMRR = {
|
|
2392
|
+
amount: string;
|
|
2393
|
+
currency: string;
|
|
2394
|
+
scheduled: ScheduledMRR | null;
|
|
2395
|
+
};
|
|
2231
2396
|
export type SubscriptionRetryNowResult = {
|
|
2232
2397
|
subscription: Subscription;
|
|
2233
2398
|
status: string;
|
|
2234
2399
|
replayed: boolean;
|
|
2235
2400
|
};
|
|
2401
|
+
export type SyncLeasesParams = {
|
|
2402
|
+
lease_id?: string;
|
|
2403
|
+
usage?: LeaseUsage[];
|
|
2404
|
+
in_flight?: InFlight[];
|
|
2405
|
+
views?: ViewParams[];
|
|
2406
|
+
close?: boolean;
|
|
2407
|
+
};
|
|
2408
|
+
export type SyncLeasesResult = {
|
|
2409
|
+
lease: Lease;
|
|
2410
|
+
usage: LeaseUsageResult;
|
|
2411
|
+
views: View[];
|
|
2412
|
+
limit_sets: LimitSet[];
|
|
2413
|
+
refused_views: ViewRefusal[];
|
|
2414
|
+
pricing: ViewPricing[];
|
|
2415
|
+
gates: number;
|
|
2416
|
+
};
|
|
2417
|
+
export type TestMessage = {
|
|
2418
|
+
recipient: string;
|
|
2419
|
+
message: MessagePreview;
|
|
2420
|
+
};
|
|
2236
2421
|
export type TieredPrice = {
|
|
2237
2422
|
mode?: "graduated" | "volume";
|
|
2238
2423
|
tiers?: RateTier[];
|
|
@@ -2252,6 +2437,7 @@ export type UpdateCustomerParams = {
|
|
|
2252
2437
|
credit_limits?: CreditLimit[];
|
|
2253
2438
|
trust_levels?: TrustLevel[];
|
|
2254
2439
|
low_balance_lines?: LowBalanceLine[];
|
|
2440
|
+
limits?: LimitOverride[];
|
|
2255
2441
|
billing_policy?: string | null;
|
|
2256
2442
|
invoice_profile?: InvoiceProfile | null;
|
|
2257
2443
|
};
|
|
@@ -2260,23 +2446,23 @@ export type UpdateMerchantConfigurationParams = {
|
|
|
2260
2446
|
display_name?: string;
|
|
2261
2447
|
usage_billing?: UsageBillingSettings;
|
|
2262
2448
|
profile?: MerchantProfile;
|
|
2263
|
-
collection_threshold?: string;
|
|
2264
|
-
monthly_floor?: string;
|
|
2265
2449
|
billing_period_boundary?: string;
|
|
2266
2450
|
alert_email?: string;
|
|
2267
2451
|
reprice_notice_window_days?: number;
|
|
2268
|
-
provider_refund_access?:
|
|
2452
|
+
provider_refund_access?: "keep" | "revoke_on_any" | "revoke_on_full";
|
|
2453
|
+
fraud_warning_refund?: "record" | "refund";
|
|
2269
2454
|
arrears_grace_days?: number;
|
|
2270
|
-
arrears_delinquency_floor?: string;
|
|
2271
2455
|
psp_routing?: PSPRoutingRule[];
|
|
2272
2456
|
dunning_policy?: DunningPolicy;
|
|
2273
2457
|
checkout?: MerchantCheckoutSettings;
|
|
2274
2458
|
balance_notices?: BalanceNoticeSettings;
|
|
2459
|
+
accounting?: AccountingSettings;
|
|
2275
2460
|
card_vault?: string;
|
|
2276
2461
|
charge_psps?: string[];
|
|
2277
2462
|
billing_policies?: BillingPolicy[];
|
|
2278
2463
|
billing_policy_bindings?: BillingPolicyBinding[];
|
|
2279
2464
|
delegated_invoker_wasted_spend_limits?: BudgetWindow[];
|
|
2465
|
+
currencies?: MerchantCurrency[];
|
|
2280
2466
|
};
|
|
2281
2467
|
export type UpdatePSPImportParams = {
|
|
2282
2468
|
rules?: PSPImportRule[];
|
|
@@ -2299,7 +2485,7 @@ export type UpdatePaymentMethodParams = {
|
|
|
2299
2485
|
};
|
|
2300
2486
|
export type UpdatePriceParams = {
|
|
2301
2487
|
archived?: boolean | null;
|
|
2302
|
-
sell_via?:
|
|
2488
|
+
sell_via?: ("card" | "solana")[] | null;
|
|
2303
2489
|
expected_revision?: number;
|
|
2304
2490
|
};
|
|
2305
2491
|
export type UpdateProductParams = {
|
|
@@ -2319,7 +2505,7 @@ export type Usage = {
|
|
|
2319
2505
|
currency: string;
|
|
2320
2506
|
from: string;
|
|
2321
2507
|
to: string;
|
|
2322
|
-
group_by: "event_type" | "invoker" | "meter"
|
|
2508
|
+
group_by: "event_type" | "invoker" | "meter";
|
|
2323
2509
|
rows: UsageRow[];
|
|
2324
2510
|
next_cursor: string | null;
|
|
2325
2511
|
};
|
|
@@ -2338,56 +2524,102 @@ export type UsageBillingCurrency = {
|
|
|
2338
2524
|
currency: string;
|
|
2339
2525
|
credit_limit: string;
|
|
2340
2526
|
minimum_invoice_amount: string;
|
|
2527
|
+
collection_threshold: string | null;
|
|
2528
|
+
delinquency_floor: string | null;
|
|
2341
2529
|
};
|
|
2342
2530
|
export type UsageBillingSettings = {
|
|
2343
2531
|
billing_day: number;
|
|
2344
2532
|
currencies: UsageBillingCurrency[];
|
|
2345
2533
|
};
|
|
2346
|
-
export type
|
|
2534
|
+
export type UsageDeduction = {
|
|
2535
|
+
period_starts_at: string;
|
|
2536
|
+
period_ends_at: string;
|
|
2537
|
+
through: string;
|
|
2538
|
+
amount: string;
|
|
2539
|
+
lines: UsageDeductionLine[];
|
|
2540
|
+
};
|
|
2541
|
+
export type UsageDeductionLine = {
|
|
2347
2542
|
meter_key: string;
|
|
2348
|
-
model: "dynamic" | "flat" | "package" | "per_unit" | "tiered";
|
|
2349
2543
|
cell: string | null;
|
|
2544
|
+
requests: number;
|
|
2350
2545
|
quantity: number;
|
|
2351
2546
|
amount: string;
|
|
2352
2547
|
};
|
|
2353
|
-
export type
|
|
2354
|
-
|
|
2355
|
-
|
|
2356
|
-
|
|
2357
|
-
|
|
2548
|
+
export type UsageRow = {
|
|
2549
|
+
key: string;
|
|
2550
|
+
cell: string | null;
|
|
2551
|
+
event_count: number;
|
|
2552
|
+
amount: string;
|
|
2553
|
+
quantity: number | null;
|
|
2358
2554
|
};
|
|
2359
|
-
export type
|
|
2360
|
-
id: string;
|
|
2555
|
+
export type View = {
|
|
2361
2556
|
customer_id: string;
|
|
2362
|
-
invoker: string;
|
|
2363
2557
|
currency: string;
|
|
2558
|
+
as_of: string;
|
|
2559
|
+
limits: ViewLimit[];
|
|
2560
|
+
};
|
|
2561
|
+
export type ViewCount = {
|
|
2562
|
+
limit: string;
|
|
2563
|
+
meter: string;
|
|
2364
2564
|
event_type: string;
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
2368
|
-
|
|
2369
|
-
|
|
2370
|
-
|
|
2371
|
-
|
|
2372
|
-
|
|
2373
|
-
|
|
2374
|
-
|
|
2375
|
-
|
|
2376
|
-
|
|
2377
|
-
|
|
2565
|
+
value_property: string;
|
|
2566
|
+
aggregation: "count" | "latest" | "max" | "min" | "sum" | "unique_count";
|
|
2567
|
+
group_by: Record<string, string> | null;
|
|
2568
|
+
filter: Record<string, string[]> | null;
|
|
2569
|
+
weight: number;
|
|
2570
|
+
per: number;
|
|
2571
|
+
};
|
|
2572
|
+
export type ViewLimit = {
|
|
2573
|
+
limit: string;
|
|
2574
|
+
unit: string;
|
|
2575
|
+
reset: LimitReset | null;
|
|
2576
|
+
overrun: "admit_while_positive" | "require_estimate";
|
|
2577
|
+
capacity: string;
|
|
2578
|
+
used: string;
|
|
2579
|
+
held: string;
|
|
2580
|
+
remaining: string;
|
|
2581
|
+
window_starts_at: string | null;
|
|
2582
|
+
window_ends_at: string | null;
|
|
2583
|
+
resets_at: string | null;
|
|
2584
|
+
next: ViewWindow | null;
|
|
2585
|
+
drain_per_hour: string;
|
|
2586
|
+
};
|
|
2587
|
+
export type ViewParams = {
|
|
2588
|
+
customer_id?: string;
|
|
2589
|
+
invoker?: string;
|
|
2590
|
+
invoker_type?: "customer" | "delegated";
|
|
2591
|
+
trust_level?: string | null;
|
|
2592
|
+
roles?: string[];
|
|
2593
|
+
resource?: string | null;
|
|
2594
|
+
currency?: string;
|
|
2595
|
+
event_type?: string | null;
|
|
2378
2596
|
};
|
|
2379
|
-
export type
|
|
2597
|
+
export type ViewPricing = {
|
|
2598
|
+
currency: string;
|
|
2599
|
+
event_type: string;
|
|
2600
|
+
counts: ViewCount[];
|
|
2601
|
+
rate_cards: ViewRateCard[];
|
|
2602
|
+
price_bounds: PriceBound[];
|
|
2603
|
+
};
|
|
2604
|
+
export type ViewRateCard = {
|
|
2605
|
+
meter: string;
|
|
2606
|
+
event_type: string;
|
|
2607
|
+
value_property: string;
|
|
2608
|
+
aggregation: "count" | "latest" | "max" | "min" | "sum" | "unique_count";
|
|
2609
|
+
group_by: Record<string, string> | null;
|
|
2610
|
+
filter: Record<string, string[]> | null;
|
|
2611
|
+
allowance: Allowance | null;
|
|
2612
|
+
price: RatePrice;
|
|
2613
|
+
};
|
|
2614
|
+
export type ViewRefusal = {
|
|
2615
|
+
index: number;
|
|
2380
2616
|
status: number;
|
|
2381
|
-
event: UsageEvent | null;
|
|
2382
2617
|
error: ErrorDetails | null;
|
|
2383
2618
|
};
|
|
2384
|
-
export type
|
|
2385
|
-
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
amount: string;
|
|
2389
|
-
quantity: number | null;
|
|
2390
|
-
dimensions: Record<string, number> | null;
|
|
2619
|
+
export type ViewWindow = {
|
|
2620
|
+
starts_at: string | null;
|
|
2621
|
+
ends_at: string | null;
|
|
2622
|
+
remaining: string;
|
|
2391
2623
|
};
|
|
2392
2624
|
export type WebhookReceipt = {
|
|
2393
2625
|
status: string;
|