@openrails/billing-ui 0.281.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 +6 -2
- 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/duration.d.ts +4 -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-BUUdvmqC.js → admin-auth-C0pBH3kp.js} +2 -2
- package/dist/{admin-auth-BUUdvmqC.js.map → admin-auth-C0pBH3kp.js.map} +1 -1
- package/dist/{admin-badge-CAlUmS2s.js → admin-badge-C_-j7ANF.js} +2 -2
- package/dist/{admin-badge-CAlUmS2s.js.map → admin-badge-C_-j7ANF.js.map} +1 -1
- package/dist/{admin-button-Bn4otsuw.js → admin-button-BV5MAL2H.js} +2 -2
- package/dist/{admin-button-Bn4otsuw.js.map → admin-button-BV5MAL2H.js.map} +1 -1
- package/dist/{admin-capabilities-DS-X-__V.js → admin-capabilities-B3ZfkA49.js} +21 -13
- package/dist/admin-capabilities-B3ZfkA49.js.map +1 -0
- package/dist/{admin-card-BHKW1dfB.js → admin-card-DQ61c-kV.js} +2 -2
- package/dist/{admin-card-BHKW1dfB.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-Qo9Sq6lN.js → admin-cursor-pager-dkNj-gb6.js} +22 -22
- package/dist/{admin-cursor-pager-Qo9Sq6lN.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-BZP6Jv-i.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-BiFmcf0Z.js → admin-data-table-BjA8cBsr.js} +5 -5
- package/dist/{admin-data-table-BiFmcf0Z.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-cijme9Lc.js → admin-detail-DO9wd12I.js} +130 -107
- package/dist/admin-detail-DO9wd12I.js.map +1 -0
- package/dist/{admin-detail-CQws8363.js → admin-detail-M7YFYOGN.js} +211 -210
- package/dist/{admin-detail-CQws8363.js.map → admin-detail-M7YFYOGN.js.map} +1 -1
- package/dist/admin-detail-sOLj-K-Y.js +336 -0
- package/dist/{admin-detail-NApy5bio.js.map → admin-detail-sOLj-K-Y.js.map} +1 -1
- package/dist/admin-detail-uZ-eR2TT.js +292 -0
- package/dist/{admin-detail-C6VH3i2v.js.map → admin-detail-uZ-eR2TT.js.map} +1 -1
- package/dist/{admin-dialog-CgYGInHi.js → admin-dialog-BxRcYcQM.js} +3 -3
- package/dist/{admin-dialog-CgYGInHi.js.map → admin-dialog-BxRcYcQM.js.map} +1 -1
- package/dist/{admin-dropdown-menu-CU9RxoEJ.js → admin-dropdown-menu-DlyaKwyU.js} +2 -2
- package/dist/{admin-dropdown-menu-CU9RxoEJ.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-lN-MsuSp.js → admin-fact-card-2DujC_r3.js} +2 -2
- package/dist/{admin-fact-card-lN-MsuSp.js.map → admin-fact-card-2DujC_r3.js.map} +1 -1
- package/dist/{admin-utils-CX097OR7.js → admin-format-Bc4NWK0F.js} +495 -328
- package/dist/admin-format-Bc4NWK0F.js.map +1 -0
- package/dist/{admin-health-CnagC763.js → admin-health-DePsyIlc.js} +217 -196
- package/dist/admin-health-DePsyIlc.js.map +1 -0
- package/dist/{admin-imports-SM_fKKgW.js → admin-imports-BrQH3u9M.js} +85 -86
- package/dist/{admin-imports-SM_fKKgW.js.map → admin-imports-BrQH3u9M.js.map} +1 -1
- package/dist/{admin-input-B_EUzCAE.js → admin-input-BZ2ExV_5.js} +2 -2
- package/dist/{admin-input-B_EUzCAE.js.map → admin-input-BZ2ExV_5.js.map} +1 -1
- package/dist/{admin-label-DQsOkp1p.js → admin-label-DecDO0oV.js} +2 -2
- package/dist/{admin-label-DQsOkp1p.js.map → admin-label-DecDO0oV.js.map} +1 -1
- package/dist/{admin-linked-table-row-BFsgc9tz.js → admin-linked-table-row-ChxhVptQ.js} +3 -3
- package/dist/{admin-linked-table-row-BFsgc9tz.js.map → admin-linked-table-row-ChxhVptQ.js.map} +1 -1
- package/dist/{admin-map-dialog-Dt3gTuTD.js → admin-map-dialog-CQmGOBMw.js} +12 -12
- package/dist/{admin-map-dialog-Dt3gTuTD.js.map → admin-map-dialog-CQmGOBMw.js.map} +1 -1
- package/dist/admin-metering-OXGOVQ7e.js +1716 -0
- package/dist/{admin-metering-DM4KhjOq.js.map → admin-metering-OXGOVQ7e.js.map} +1 -1
- package/dist/{admin-missing-record-G2Jz-VUn.js → admin-missing-record-B_9LpSIW.js} +4 -4
- package/dist/{admin-missing-record-G2Jz-VUn.js.map → admin-missing-record-B_9LpSIW.js.map} +1 -1
- package/dist/admin-ops-BTSunx1i.js +357 -0
- package/dist/{admin-ops-mwzj-jpg.js.map → admin-ops-BTSunx1i.js.map} +1 -1
- package/dist/{admin-orders-D_aqV66h.js → admin-orders-LqlpQVFo.js} +59 -60
- package/dist/{admin-orders-D_aqV66h.js.map → admin-orders-LqlpQVFo.js.map} +1 -1
- package/dist/{admin-parked-2FjIfyMg.js → admin-parked-Ch6mlS5f.js} +61 -62
- package/dist/{admin-parked-2FjIfyMg.js.map → admin-parked-Ch6mlS5f.js.map} +1 -1
- package/dist/{admin-payments-B4hh31PR.js → admin-payments-yNntF4i4.js} +42 -42
- package/dist/{admin-payments-B4hh31PR.js.map → admin-payments-yNntF4i4.js.map} +1 -1
- package/dist/{admin-price-detail--5Bovz20.js → admin-price-detail-DvmcYr8B.js} +131 -132
- package/dist/admin-price-detail-DvmcYr8B.js.map +1 -0
- package/dist/{admin-price-format-C-pus9FL.js → admin-price-format-Btdg11-J.js} +14 -5
- package/dist/admin-price-format-Btdg11-J.js.map +1 -0
- package/dist/admin-price-wizard-EFO3nBV8.js +376 -0
- package/dist/admin-price-wizard-EFO3nBV8.js.map +1 -0
- package/dist/{admin-proposals-DPRFoWel.js → admin-proposals-CO0LKHM8.js} +119 -120
- package/dist/{admin-proposals-DPRFoWel.js.map → admin-proposals-CO0LKHM8.js.map} +1 -1
- package/dist/admin-provider-prices-ZjQeEV1n.js +239 -0
- package/dist/{admin-provider-prices-B8Oc86dP.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-CSWcCYkg.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-CWbfqyT8.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-DSGCZFiZ.js → admin-select-CgZq2j0G.js} +2 -2
- package/dist/{admin-select-DSGCZFiZ.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-DdN2hyaR.js → admin-shared-DoBOSwkv.js} +33 -34
- package/dist/{admin-shared-DdN2hyaR.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-DOfsDIu0.js → admin-skeleton-DdqwXcr4.js} +2 -2
- package/dist/{admin-skeleton-DOfsDIu0.js.map → admin-skeleton-DdqwXcr4.js.map} +1 -1
- package/dist/{admin-status-badge-BLEGt2Fw.js → admin-status-badge-B8rjk6QR.js} +5 -3
- package/dist/admin-status-badge-B8rjk6QR.js.map +1 -0
- package/dist/{admin-subscriptions-PL5G3f0O.js → admin-subscriptions-CjYPSPs-.js} +43 -38
- package/dist/admin-subscriptions-CjYPSPs-.js.map +1 -0
- package/dist/{admin-switch-aOiQQzST.js → admin-switch-CyYmt8wi.js} +2 -2
- package/dist/{admin-switch-aOiQQzST.js.map → admin-switch-CyYmt8wi.js.map} +1 -1
- package/dist/{admin-table-DIKl2rpV.js → admin-table-ByPfWNq8.js} +2 -2
- package/dist/{admin-table-DIKl2rpV.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-W52-l_0n.js → admin-textarea-CQg__KGc.js} +2 -2
- package/dist/{admin-textarea-W52-l_0n.js.map → admin-textarea-CQg__KGc.js.map} +1 -1
- package/dist/{admin-typed-confirm-dialog-B_00EHlT.js → admin-typed-confirm-dialog-BvAYEh3H.js} +6 -6
- package/dist/{admin-typed-confirm-dialog-B_00EHlT.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 +514 -277
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.d.ts +76 -8
- package/dist/{client-DwsFGm4M.js → client-D8qT6xjo.js} +86 -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-C-MhXjQh.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 +847 -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/lib/price-label.d.ts +1 -1
- package/dist/locales/en.d.ts +4 -0
- package/dist/locales/en.js +4 -0
- package/dist/locales/en.js.map +1 -1
- 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-DjgBAbx9.js +0 -418
- package/dist/admin-attempts-DjgBAbx9.js.map +0 -1
- package/dist/admin-capabilities-DS-X-__V.js.map +0 -1
- package/dist/admin-catalog-BdLDhr8R.js +0 -1096
- package/dist/admin-catalog-BdLDhr8R.js.map +0 -1
- package/dist/admin-customers-BZP6Jv-i.js.map +0 -1
- package/dist/admin-dashboard-BJSonknv.js +0 -461
- package/dist/admin-dashboard-BJSonknv.js.map +0 -1
- package/dist/admin-detail-C03O0R6e.js +0 -1351
- package/dist/admin-detail-C03O0R6e.js.map +0 -1
- package/dist/admin-detail-C6VH3i2v.js +0 -293
- package/dist/admin-detail-NApy5bio.js +0 -337
- package/dist/admin-detail-cijme9Lc.js.map +0 -1
- package/dist/admin-format-D9Ablh0P.js +0 -169
- package/dist/admin-format-D9Ablh0P.js.map +0 -1
- package/dist/admin-health-CnagC763.js.map +0 -1
- package/dist/admin-metering-DM4KhjOq.js +0 -1717
- package/dist/admin-ops-mwzj-jpg.js +0 -358
- package/dist/admin-price-detail--5Bovz20.js.map +0 -1
- package/dist/admin-price-format-C-pus9FL.js.map +0 -1
- package/dist/admin-price-wizard-Cj_Bgh-V.js +0 -354
- package/dist/admin-price-wizard-Cj_Bgh-V.js.map +0 -1
- package/dist/admin-provider-prices-B8Oc86dP.js +0 -240
- package/dist/admin-range-picker-CSWcCYkg.js.map +0 -1
- package/dist/admin-records-CWbfqyT8.js +0 -390
- package/dist/admin-reports-CAHWO_d6.js +0 -319
- package/dist/admin-reports-CAHWO_d6.js.map +0 -1
- package/dist/admin-settings-BrvNTJlM.js +0 -1818
- package/dist/admin-settings-BrvNTJlM.js.map +0 -1
- package/dist/admin-status-badge-BLEGt2Fw.js.map +0 -1
- package/dist/admin-subscriptions-PL5G3f0O.js.map +0 -1
- package/dist/admin-tabs-DR74xX0-.js +0 -156
- package/dist/admin-tabs-DR74xX0-.js.map +0 -1
- package/dist/admin-utils-CX097OR7.js.map +0 -1
- package/dist/admin-widget-viz-DVV9aTQp.js +0 -643
- package/dist/admin-widget-viz-DVV9aTQp.js.map +0 -1
- package/dist/client-DwsFGm4M.js.map +0 -1
- package/dist/hooks-C-MhXjQh.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;
|
|
@@ -89,6 +43,7 @@ export type AgreementSubscription = {
|
|
|
89
43
|
product: string;
|
|
90
44
|
amount: string;
|
|
91
45
|
billing_interval_hours: number | null;
|
|
46
|
+
billing_interval_months: number | null;
|
|
92
47
|
next_charge_at: string | null;
|
|
93
48
|
};
|
|
94
49
|
export type AlertWebhook = {
|
|
@@ -109,6 +64,13 @@ export type Application = {
|
|
|
109
64
|
entitlement_replacements?: EntitlementReplacement[];
|
|
110
65
|
products?: Record<string, ApplyProduct>;
|
|
111
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;
|
|
112
74
|
};
|
|
113
75
|
export type ApplyMeter = {
|
|
114
76
|
event_type?: string | null;
|
|
@@ -123,12 +85,13 @@ export type ApplyPrice = {
|
|
|
123
85
|
unit_amount?: string | null;
|
|
124
86
|
access_duration_hours?: number | null;
|
|
125
87
|
billing_interval_hours?: number | null;
|
|
88
|
+
billing_interval_months?: number | null;
|
|
126
89
|
archived?: boolean | null;
|
|
127
90
|
trial_unit_amount?: string | null;
|
|
128
91
|
trial_duration_hours?: number | null;
|
|
129
92
|
customer_amount?: CustomerAmount | null;
|
|
130
93
|
quantity?: Quantity | null;
|
|
131
|
-
sell_via?:
|
|
94
|
+
sell_via?: ("card" | "solana")[] | null;
|
|
132
95
|
amount?: string;
|
|
133
96
|
access_duration?: string | null;
|
|
134
97
|
billing_interval?: string | null;
|
|
@@ -147,6 +110,7 @@ export type ApplyProduct = {
|
|
|
147
110
|
prices?: Record<string, ApplyPrice>;
|
|
148
111
|
provider_prices?: Record<string, ApplyProviderPrice>;
|
|
149
112
|
rate_cards?: RateCard[] | null;
|
|
113
|
+
limits?: Record<string, string> | null;
|
|
150
114
|
};
|
|
151
115
|
export type ApplyProviderPrice = {
|
|
152
116
|
psp?: string;
|
|
@@ -167,12 +131,10 @@ export type ApproveProposalsParams = {
|
|
|
167
131
|
ids?: string[];
|
|
168
132
|
notes?: string;
|
|
169
133
|
};
|
|
170
|
-
export type AskCatalogParams = {
|
|
171
|
-
question?: string;
|
|
172
|
-
};
|
|
173
134
|
export type Balance = {
|
|
174
135
|
customer_id: string;
|
|
175
136
|
currency: string;
|
|
137
|
+
unit: MerchantCurrency | null;
|
|
176
138
|
billing_mode: "arrears" | "prepaid";
|
|
177
139
|
balance_amount: string;
|
|
178
140
|
held_amount: string;
|
|
@@ -195,13 +157,14 @@ export type BalanceTransaction = {
|
|
|
195
157
|
id: string;
|
|
196
158
|
customer_id: string;
|
|
197
159
|
currency: string;
|
|
198
|
-
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";
|
|
199
161
|
amount: string;
|
|
200
162
|
credit_grant_id: string | null;
|
|
201
163
|
invoker: string | null;
|
|
202
164
|
resource: string | null;
|
|
203
165
|
source: string;
|
|
204
166
|
source_id: string;
|
|
167
|
+
usage: UsageDeduction | null;
|
|
205
168
|
created_at: string;
|
|
206
169
|
};
|
|
207
170
|
export type BillingAddress = {
|
|
@@ -224,6 +187,10 @@ export type BillingDetails = {
|
|
|
224
187
|
phone: string | null;
|
|
225
188
|
address: BillingAddress | null;
|
|
226
189
|
};
|
|
190
|
+
export type BillingFieldSettings = {
|
|
191
|
+
country?: "auto" | "hidden" | "optional" | "required";
|
|
192
|
+
postal_code?: "auto" | "hidden" | "optional" | "required";
|
|
193
|
+
};
|
|
227
194
|
export type BillingImportResult = {
|
|
228
195
|
imported: string[];
|
|
229
196
|
skipped: string[];
|
|
@@ -275,41 +242,6 @@ export type CaptchaConfig = {
|
|
|
275
242
|
action: string;
|
|
276
243
|
token_header: string;
|
|
277
244
|
};
|
|
278
|
-
export type CaptureAdmissionBatchParams = {
|
|
279
|
-
items?: CaptureAdmissionParams[];
|
|
280
|
-
};
|
|
281
|
-
export type CaptureAdmissionParams = {
|
|
282
|
-
request_id?: string;
|
|
283
|
-
usage: CaptureUsage;
|
|
284
|
-
amount?: string;
|
|
285
|
-
};
|
|
286
|
-
export type CaptureBatchResult = {
|
|
287
|
-
items: CaptureResult[];
|
|
288
|
-
};
|
|
289
|
-
export type CaptureReceipt = {
|
|
290
|
-
request_id: string;
|
|
291
|
-
customer_id: string;
|
|
292
|
-
currency: string;
|
|
293
|
-
estimated_amount: string;
|
|
294
|
-
amount: string;
|
|
295
|
-
charges: UsageCharge[];
|
|
296
|
-
usage_event_id: string | null;
|
|
297
|
-
balance_transaction_id: string | null;
|
|
298
|
-
replayed: boolean;
|
|
299
|
-
};
|
|
300
|
-
export type CaptureResult = {
|
|
301
|
-
status: number;
|
|
302
|
-
receipt: CaptureReceipt | null;
|
|
303
|
-
error: ErrorDetails | null;
|
|
304
|
-
};
|
|
305
|
-
export type CaptureUsage = {
|
|
306
|
-
event_type?: string;
|
|
307
|
-
resource?: string;
|
|
308
|
-
metadata?: Record<string, unknown>;
|
|
309
|
-
source?: string;
|
|
310
|
-
source_id?: string;
|
|
311
|
-
dimensions?: Record<string, number>;
|
|
312
|
-
};
|
|
313
245
|
export type CardDetails = {
|
|
314
246
|
brand: string | null;
|
|
315
247
|
last4: string | null;
|
|
@@ -330,11 +262,6 @@ export type Cart = {
|
|
|
330
262
|
last_changed_at: string | null;
|
|
331
263
|
expires_at: string | null;
|
|
332
264
|
};
|
|
333
|
-
export type CatalogAnswer = {
|
|
334
|
-
answer: string;
|
|
335
|
-
evidence: CatalogEvidence[];
|
|
336
|
-
drafts: CatalogDraft[];
|
|
337
|
-
};
|
|
338
265
|
export type CatalogApplicationReceipt = {
|
|
339
266
|
application_id: string;
|
|
340
267
|
base_revision: number;
|
|
@@ -348,35 +275,20 @@ export type CatalogApplicationReceipt = {
|
|
|
348
275
|
warnings: CatalogWarning[];
|
|
349
276
|
};
|
|
350
277
|
export type CatalogChange = {
|
|
351
|
-
object: "meter" | "price" | "product";
|
|
278
|
+
object: "limit" | "meter" | "price" | "product";
|
|
352
279
|
key: string;
|
|
353
280
|
product_key: string | null;
|
|
354
281
|
fields: string[];
|
|
355
282
|
revision: number;
|
|
283
|
+
deleted: boolean;
|
|
356
284
|
};
|
|
357
285
|
export type CatalogConflict = {
|
|
358
|
-
object: "meter" | "price" | "product";
|
|
286
|
+
object: "limit" | "meter" | "price" | "product";
|
|
359
287
|
key: string;
|
|
360
288
|
product_key: string | null;
|
|
361
289
|
currency: string | null;
|
|
362
290
|
fields: CatalogFieldConflict[];
|
|
363
291
|
};
|
|
364
|
-
export type CatalogDraft = {
|
|
365
|
-
kind: "new_price" | "price_change" | "refused";
|
|
366
|
-
price_change: PriceChangeDraft | null;
|
|
367
|
-
new_price: NewPriceDraft | null;
|
|
368
|
-
refusal: CatalogDraftRefusal | null;
|
|
369
|
-
};
|
|
370
|
-
export type CatalogDraftRefusal = {
|
|
371
|
-
code: string;
|
|
372
|
-
reason: string;
|
|
373
|
-
workaround: string;
|
|
374
|
-
};
|
|
375
|
-
export type CatalogEvidence = {
|
|
376
|
-
tool: string;
|
|
377
|
-
args: string;
|
|
378
|
-
summary: string;
|
|
379
|
-
};
|
|
380
292
|
export type CatalogFieldConflict = {
|
|
381
293
|
field: string;
|
|
382
294
|
file_value: unknown | null;
|
|
@@ -419,6 +331,7 @@ export type CheckEntitlementsParams = {
|
|
|
419
331
|
prefixes?: string[];
|
|
420
332
|
prefix_limit?: number;
|
|
421
333
|
at?: string;
|
|
334
|
+
include_validity?: boolean;
|
|
422
335
|
};
|
|
423
336
|
export type ClearDestructiveHoldParams = {
|
|
424
337
|
reason?: string;
|
|
@@ -447,6 +360,7 @@ export type CreateCreditGrantParams = {
|
|
|
447
360
|
amount?: string;
|
|
448
361
|
source_id?: string;
|
|
449
362
|
source?: string;
|
|
363
|
+
funding_source?: "grant" | "import" | "promotion";
|
|
450
364
|
invoker?: string;
|
|
451
365
|
expires_at?: string;
|
|
452
366
|
description?: string;
|
|
@@ -458,12 +372,14 @@ export type CreateMyOrderParams = {
|
|
|
458
372
|
payment?: OrderPaymentParams;
|
|
459
373
|
reusable?: boolean;
|
|
460
374
|
pay_url?: MyOrderPayURLParams;
|
|
375
|
+
attribution?: OrderAttribution;
|
|
461
376
|
};
|
|
462
377
|
export type CreateOrderParams = {
|
|
463
378
|
customer_id?: string;
|
|
464
379
|
lines?: OrderLineParams[];
|
|
465
380
|
expires_at?: string;
|
|
466
381
|
pay_url?: OrderPayURLParams;
|
|
382
|
+
attribution?: OrderAttribution;
|
|
467
383
|
};
|
|
468
384
|
export type CreatePSPImportParams = {
|
|
469
385
|
psp?: PSPRef;
|
|
@@ -473,7 +389,7 @@ export type CreatePSPImportParams = {
|
|
|
473
389
|
export type CreatePSPParams = {
|
|
474
390
|
key?: string;
|
|
475
391
|
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
476
|
-
environment?:
|
|
392
|
+
environment?: "devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet";
|
|
477
393
|
custodian?: string;
|
|
478
394
|
gateway_id?: string;
|
|
479
395
|
account_id?: string;
|
|
@@ -507,19 +423,20 @@ export type CreatePriceParams = {
|
|
|
507
423
|
product_key?: string;
|
|
508
424
|
product_data?: CreatePriceProduct;
|
|
509
425
|
key?: string;
|
|
510
|
-
unit_amount
|
|
511
|
-
currency
|
|
426
|
+
unit_amount?: string;
|
|
427
|
+
currency?: string;
|
|
512
428
|
access_duration_hours?: number;
|
|
513
429
|
billing_interval_hours?: number;
|
|
430
|
+
billing_interval_months?: number;
|
|
514
431
|
trial_unit_amount?: string;
|
|
515
432
|
trial_duration_hours?: number;
|
|
516
|
-
sell_via?:
|
|
433
|
+
sell_via?: ("card" | "solana")[];
|
|
517
434
|
archived?: boolean;
|
|
518
435
|
expected_revision?: number;
|
|
519
436
|
};
|
|
520
437
|
export type CreatePriceProduct = {
|
|
521
|
-
key
|
|
522
|
-
display_name
|
|
438
|
+
key?: string;
|
|
439
|
+
display_name?: string;
|
|
523
440
|
description?: string;
|
|
524
441
|
};
|
|
525
442
|
export type CreateProductAccessBatchParams = {
|
|
@@ -569,6 +486,11 @@ export type CreateProviderPriceParams = {
|
|
|
569
486
|
export type CreateProvisioningTokenParams = {
|
|
570
487
|
name?: string;
|
|
571
488
|
};
|
|
489
|
+
export type CreateTestMessageParams = {
|
|
490
|
+
event_type?: string;
|
|
491
|
+
language?: string;
|
|
492
|
+
template?: MessageTemplate | null;
|
|
493
|
+
};
|
|
572
494
|
export type CreatedProvisioningToken = {
|
|
573
495
|
id: string;
|
|
574
496
|
name: string;
|
|
@@ -586,15 +508,18 @@ export type CreditGrant = {
|
|
|
586
508
|
remaining_amount: string;
|
|
587
509
|
revoked_amount: string;
|
|
588
510
|
expired_amount: string;
|
|
589
|
-
|
|
590
|
-
|
|
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;
|
|
591
516
|
source_id: string | null;
|
|
592
517
|
description: string | null;
|
|
593
518
|
starts_at: string;
|
|
594
519
|
expires_at: string | null;
|
|
595
520
|
created_at: string;
|
|
596
|
-
|
|
597
|
-
|
|
521
|
+
revoked_at: string | null;
|
|
522
|
+
revoke_reason: string | null;
|
|
598
523
|
replayed: boolean;
|
|
599
524
|
};
|
|
600
525
|
export type CreditGrantSpec = {
|
|
@@ -615,8 +540,8 @@ export type CurrencyUnits = {
|
|
|
615
540
|
};
|
|
616
541
|
export type Custodian = {
|
|
617
542
|
key: string;
|
|
618
|
-
kind:
|
|
619
|
-
environment:
|
|
543
|
+
kind: "basis_theory" | "hyperswitch";
|
|
544
|
+
environment: "devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet";
|
|
620
545
|
account_id: string;
|
|
621
546
|
settings: Record<string, unknown> | null;
|
|
622
547
|
credentials: Record<string, PSPCredential> | null;
|
|
@@ -661,6 +586,7 @@ export type CustomerConfig = {
|
|
|
661
586
|
payment: PaymentConfig;
|
|
662
587
|
merchant: PublicMerchant;
|
|
663
588
|
client_country: string;
|
|
589
|
+
currencies: MerchantCurrency[];
|
|
664
590
|
};
|
|
665
591
|
export type CustomerContact = {
|
|
666
592
|
email: string | null;
|
|
@@ -674,11 +600,37 @@ export type CustomerEntitlement = {
|
|
|
674
600
|
entitlement: string;
|
|
675
601
|
quantity: number | null;
|
|
676
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
|
+
};
|
|
677
628
|
export type CustomerSettings = {
|
|
678
629
|
usage_billing?: UsageBillingAccount[];
|
|
679
630
|
credit_limits: CreditLimit[];
|
|
680
631
|
trust_levels: TrustLevel[];
|
|
681
632
|
low_balance_lines: LowBalanceLine[];
|
|
633
|
+
limits: LimitOverride[];
|
|
682
634
|
billing_policy: string | null;
|
|
683
635
|
invoice_profile: InvoiceProfile | null;
|
|
684
636
|
};
|
|
@@ -689,6 +641,7 @@ export type CustomerSettingsResult = {
|
|
|
689
641
|
export type Dashboard = {
|
|
690
642
|
widgets: DashboardWidget[];
|
|
691
643
|
is_default: boolean;
|
|
644
|
+
profile: DashboardProfile | null;
|
|
692
645
|
updated_at: string | null;
|
|
693
646
|
updated_by: string | null;
|
|
694
647
|
};
|
|
@@ -698,11 +651,18 @@ export type DashboardGrid = {
|
|
|
698
651
|
w: number;
|
|
699
652
|
h: number;
|
|
700
653
|
};
|
|
654
|
+
export type DashboardProfile = {
|
|
655
|
+
subscriptions: boolean;
|
|
656
|
+
card_payments: boolean;
|
|
657
|
+
usage: boolean;
|
|
658
|
+
credits: boolean;
|
|
659
|
+
checkouts: boolean;
|
|
660
|
+
};
|
|
701
661
|
export type DashboardWidget = {
|
|
702
662
|
id: string;
|
|
703
663
|
title: string;
|
|
704
664
|
viz: string;
|
|
705
|
-
query:
|
|
665
|
+
query: QueryMetricsParams;
|
|
706
666
|
grid: DashboardGrid;
|
|
707
667
|
fixed_range: boolean;
|
|
708
668
|
};
|
|
@@ -735,7 +695,7 @@ export type DeclaredHistoricalPayment = {
|
|
|
735
695
|
source_id?: string;
|
|
736
696
|
customer?: string;
|
|
737
697
|
psp?: PSPRef;
|
|
738
|
-
rail?:
|
|
698
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
739
699
|
transaction_id?: string;
|
|
740
700
|
amount?: string;
|
|
741
701
|
currency?: string;
|
|
@@ -757,13 +717,13 @@ export type DeclaredOrderLine = {
|
|
|
757
717
|
export type DeclaredPSPCustomer = {
|
|
758
718
|
source_id?: string;
|
|
759
719
|
customer?: string;
|
|
760
|
-
rail?:
|
|
720
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
761
721
|
psp?: PSPRef;
|
|
762
722
|
remote_customer_ref?: string;
|
|
763
723
|
};
|
|
764
724
|
export type DeclaredPaymentMethod = {
|
|
765
725
|
customer?: string;
|
|
766
|
-
rail?:
|
|
726
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
767
727
|
psp?: PSPRef;
|
|
768
728
|
rail_customer_ref?: string;
|
|
769
729
|
rail_method_ref?: string;
|
|
@@ -783,7 +743,7 @@ export type DeclaredProviderSchedule = {
|
|
|
783
743
|
export type DeclaredPurchase = {
|
|
784
744
|
source_id?: string;
|
|
785
745
|
customer?: string;
|
|
786
|
-
rail?:
|
|
746
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
787
747
|
psp?: PSPRef;
|
|
788
748
|
transaction_id?: string;
|
|
789
749
|
currency?: string;
|
|
@@ -796,8 +756,8 @@ export type DeclaredPurchase = {
|
|
|
796
756
|
export type DeclaredSettlement = {
|
|
797
757
|
asset?: string;
|
|
798
758
|
quantity?: string;
|
|
799
|
-
|
|
800
|
-
|
|
759
|
+
from_wallet?: string;
|
|
760
|
+
to_wallet?: string;
|
|
801
761
|
};
|
|
802
762
|
export type DeclaredStripeInvoice = {
|
|
803
763
|
id?: string;
|
|
@@ -836,7 +796,7 @@ export type DeclaredSubscription = {
|
|
|
836
796
|
source_id?: string;
|
|
837
797
|
customer?: string;
|
|
838
798
|
price?: string;
|
|
839
|
-
rail?:
|
|
799
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
840
800
|
rail_subscription_id?: string;
|
|
841
801
|
psp?: PSPRef;
|
|
842
802
|
started_at?: string;
|
|
@@ -880,6 +840,51 @@ export type DismissProposalsParams = {
|
|
|
880
840
|
ids?: string[];
|
|
881
841
|
notes?: string;
|
|
882
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
|
+
};
|
|
883
888
|
export type DriftField = {
|
|
884
889
|
field: string;
|
|
885
890
|
openrails_value: string;
|
|
@@ -895,8 +900,8 @@ export type DunningPolicy = {
|
|
|
895
900
|
tiers: DunningTier[];
|
|
896
901
|
transient_retry_minutes?: number[];
|
|
897
902
|
customer_retries?: number;
|
|
898
|
-
access_during_dunning?:
|
|
899
|
-
access_while_renewal_held?:
|
|
903
|
+
access_during_dunning?: "keep" | "suspend";
|
|
904
|
+
access_while_renewal_held?: "keep" | "suspend";
|
|
900
905
|
};
|
|
901
906
|
export type DunningTier = {
|
|
902
907
|
max_cycle_hours?: number;
|
|
@@ -919,14 +924,16 @@ export type EntitlementCheck = {
|
|
|
919
924
|
entitlements: Record<string, boolean> | null;
|
|
920
925
|
quantities: Record<string, number | null> | null;
|
|
921
926
|
held: Record<string, HeldEntitlements> | null;
|
|
927
|
+
evaluated_at: string | null;
|
|
928
|
+
valid_until: string | null;
|
|
922
929
|
};
|
|
923
930
|
export type EntitlementReplacement = {
|
|
924
931
|
from?: string;
|
|
925
932
|
to?: string;
|
|
926
933
|
};
|
|
927
934
|
export type ErrorDetails = {
|
|
928
|
-
type:
|
|
929
|
-
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";
|
|
930
937
|
message: string;
|
|
931
938
|
request_id?: string;
|
|
932
939
|
param?: string;
|
|
@@ -954,13 +961,6 @@ export type EventSubject = {
|
|
|
954
961
|
type: string;
|
|
955
962
|
id: string;
|
|
956
963
|
};
|
|
957
|
-
export type ExtendAdmissionBatchParams = {
|
|
958
|
-
items?: ExtendAdmissionParams[];
|
|
959
|
-
};
|
|
960
|
-
export type ExtendAdmissionParams = {
|
|
961
|
-
request_id?: string;
|
|
962
|
-
expires_at?: string;
|
|
963
|
-
};
|
|
964
964
|
export type Finding = {
|
|
965
965
|
id: string;
|
|
966
966
|
finding_type: string;
|
|
@@ -1014,6 +1014,12 @@ export type HeldEntitlements = {
|
|
|
1014
1014
|
keys: string[];
|
|
1015
1015
|
truncated: boolean;
|
|
1016
1016
|
};
|
|
1017
|
+
export type InFlight = {
|
|
1018
|
+
customer_id?: string;
|
|
1019
|
+
limit?: string;
|
|
1020
|
+
unit?: string;
|
|
1021
|
+
amount?: string;
|
|
1022
|
+
};
|
|
1017
1023
|
export type InvoiceContact = {
|
|
1018
1024
|
name: string;
|
|
1019
1025
|
email: string;
|
|
@@ -1026,15 +1032,110 @@ export type InvoiceProfile = {
|
|
|
1026
1032
|
billing_contacts: InvoiceContact[];
|
|
1027
1033
|
memo: string;
|
|
1028
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
|
+
};
|
|
1029
1112
|
export type LinkPSPImportParams = {
|
|
1030
1113
|
links?: PSPImportLink[];
|
|
1031
1114
|
prices?: PSPImportPriceLink[];
|
|
1032
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
|
+
};
|
|
1033
1129
|
export type LowBalanceLine = {
|
|
1034
1130
|
currency: string;
|
|
1035
1131
|
amount: string | null;
|
|
1036
1132
|
runway_hours: number | null;
|
|
1037
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
|
+
};
|
|
1038
1139
|
export type Mandate = {
|
|
1039
1140
|
id: string;
|
|
1040
1141
|
customer_id: string;
|
|
@@ -1044,7 +1145,7 @@ export type Mandate = {
|
|
|
1044
1145
|
subscription_id: string | null;
|
|
1045
1146
|
currency: string | null;
|
|
1046
1147
|
status: "active" | "ended" | "requires_reconsent" | "revoked";
|
|
1047
|
-
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;
|
|
1048
1149
|
ended_at: string | null;
|
|
1049
1150
|
card_brand: string | null;
|
|
1050
1151
|
initial_transaction_id: string | null;
|
|
@@ -1064,31 +1165,38 @@ export type MatrixCell = {
|
|
|
1064
1165
|
};
|
|
1065
1166
|
export type MerchantCheckoutSettings = {
|
|
1066
1167
|
embed_origins?: string[];
|
|
1168
|
+
billing_fields?: BillingFieldSettings;
|
|
1067
1169
|
};
|
|
1068
1170
|
export type MerchantConfigurationState = {
|
|
1069
1171
|
revision: number;
|
|
1070
1172
|
display_name: string;
|
|
1071
1173
|
usage_billing?: UsageBillingSettings;
|
|
1072
1174
|
profile?: MerchantProfile;
|
|
1073
|
-
collection_threshold?: string;
|
|
1074
|
-
monthly_floor?: string;
|
|
1075
1175
|
billing_period_boundary?: string;
|
|
1076
1176
|
alert_email?: string;
|
|
1077
1177
|
reprice_notice_window_days?: number;
|
|
1078
|
-
provider_refund_access?:
|
|
1178
|
+
provider_refund_access?: "keep" | "revoke_on_any" | "revoke_on_full";
|
|
1179
|
+
fraud_warning_refund?: "record" | "refund";
|
|
1079
1180
|
arrears_grace_days?: number;
|
|
1080
|
-
arrears_delinquency_floor?: string;
|
|
1081
1181
|
psp_routing?: PSPRoutingRule[];
|
|
1082
1182
|
dunning_policy?: DunningPolicy;
|
|
1083
1183
|
checkout?: MerchantCheckoutSettings;
|
|
1084
1184
|
balance_notices?: BalanceNoticeSettings;
|
|
1185
|
+
accounting?: AccountingSettings;
|
|
1085
1186
|
card_vault?: string;
|
|
1086
1187
|
charge_psps?: string[];
|
|
1087
1188
|
billing_policies?: BillingPolicy[];
|
|
1088
1189
|
billing_policy_bindings?: BillingPolicyBinding[];
|
|
1089
1190
|
delegated_invoker_wasted_spend_limits?: BudgetWindow[];
|
|
1191
|
+
currencies?: MerchantCurrency[];
|
|
1090
1192
|
platform_vault: PlatformVaultState;
|
|
1091
1193
|
};
|
|
1194
|
+
export type MerchantCurrency = {
|
|
1195
|
+
code: string;
|
|
1196
|
+
name: string;
|
|
1197
|
+
symbol?: string;
|
|
1198
|
+
scale: number;
|
|
1199
|
+
};
|
|
1092
1200
|
export type MerchantProfile = {
|
|
1093
1201
|
logo_url?: string;
|
|
1094
1202
|
from_email?: string;
|
|
@@ -1099,6 +1207,18 @@ export type MerchantProfile = {
|
|
|
1099
1207
|
privacy_url?: string;
|
|
1100
1208
|
statement_descriptor?: string;
|
|
1101
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
|
+
};
|
|
1102
1222
|
export type Meter = {
|
|
1103
1223
|
key: string;
|
|
1104
1224
|
event_type: string;
|
|
@@ -1141,7 +1261,7 @@ export type MetricsDimension = {
|
|
|
1141
1261
|
};
|
|
1142
1262
|
export type MetricsExample = {
|
|
1143
1263
|
intent: string;
|
|
1144
|
-
query:
|
|
1264
|
+
query: QueryMetricsParams;
|
|
1145
1265
|
};
|
|
1146
1266
|
export type MetricsLimits = {
|
|
1147
1267
|
max_buckets: number;
|
|
@@ -1151,33 +1271,31 @@ export type MetricsMeasure = {
|
|
|
1151
1271
|
name: string;
|
|
1152
1272
|
class: string;
|
|
1153
1273
|
unit: string;
|
|
1274
|
+
group: string;
|
|
1275
|
+
direction: string;
|
|
1276
|
+
thresholds: MetricsThreshold[];
|
|
1154
1277
|
description: string;
|
|
1155
1278
|
formula: string;
|
|
1156
1279
|
dims: string[];
|
|
1280
|
+
dim_values?: Record<string, string[]>;
|
|
1157
1281
|
money?: boolean;
|
|
1282
|
+
utc_days?: boolean;
|
|
1283
|
+
program?: "acquirer" | "mastercard_ecp" | "mastercard_efm" | "stripe" | "visa_vamp";
|
|
1158
1284
|
};
|
|
1159
1285
|
export type MetricsOrder = {
|
|
1160
1286
|
measure?: string;
|
|
1161
1287
|
dimension?: string;
|
|
1162
1288
|
dir?: string;
|
|
1163
1289
|
};
|
|
1164
|
-
export type MetricsQuery = {
|
|
1165
|
-
measures: string[];
|
|
1166
|
-
by: string[];
|
|
1167
|
-
grain: string;
|
|
1168
|
-
range: MetricsRange | null;
|
|
1169
|
-
filters: Record<string, string[]> | null;
|
|
1170
|
-
order: MetricsOrder[];
|
|
1171
|
-
limit: number | null;
|
|
1172
|
-
compare: string;
|
|
1173
|
-
};
|
|
1174
1290
|
export type MetricsRange = {
|
|
1175
1291
|
from?: string;
|
|
1176
1292
|
to?: string;
|
|
1177
1293
|
last?: string;
|
|
1294
|
+
next?: string;
|
|
1178
1295
|
};
|
|
1179
1296
|
export type MetricsResult = {
|
|
1180
1297
|
grain?: string;
|
|
1298
|
+
timezone: string;
|
|
1181
1299
|
range: MetricsResultRange;
|
|
1182
1300
|
columns: MetricsColumn[];
|
|
1183
1301
|
rows: unknown[][];
|
|
@@ -1198,14 +1316,15 @@ export type MetricsSchema = {
|
|
|
1198
1316
|
limits: MetricsLimits;
|
|
1199
1317
|
query_shape: string;
|
|
1200
1318
|
};
|
|
1319
|
+
export type MetricsThreshold = {
|
|
1320
|
+
value: number;
|
|
1321
|
+
label: string;
|
|
1322
|
+
from?: string;
|
|
1323
|
+
until?: string;
|
|
1324
|
+
};
|
|
1201
1325
|
export type MyOrderPayURLParams = {
|
|
1202
1326
|
embedded?: boolean;
|
|
1203
1327
|
};
|
|
1204
|
-
export type NewPriceDraft = {
|
|
1205
|
-
product_key: string;
|
|
1206
|
-
review_text: string;
|
|
1207
|
-
create_price: CreatePriceParams;
|
|
1208
|
-
};
|
|
1209
1328
|
export type NextAction = {
|
|
1210
1329
|
type: string;
|
|
1211
1330
|
url: string | null;
|
|
@@ -1243,6 +1362,29 @@ export type Order = {
|
|
|
1243
1362
|
voided_at: string | null;
|
|
1244
1363
|
uncollectible_at: string | null;
|
|
1245
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;
|
|
1246
1388
|
};
|
|
1247
1389
|
export type OrderLine = {
|
|
1248
1390
|
id: string;
|
|
@@ -1255,6 +1397,7 @@ export type OrderLine = {
|
|
|
1255
1397
|
amount: string;
|
|
1256
1398
|
ownership: "consumable" | "extend" | "unique" | null;
|
|
1257
1399
|
billing_interval_hours: number | null;
|
|
1400
|
+
billing_interval_months: number | null;
|
|
1258
1401
|
access_duration_hours: number | null;
|
|
1259
1402
|
subscription_id: string | null;
|
|
1260
1403
|
product_access_id: string | null;
|
|
@@ -1299,7 +1442,7 @@ export type OrderPaymentAttempt = {
|
|
|
1299
1442
|
export type OrderPaymentOption = {
|
|
1300
1443
|
saved_payment_method_ids?: string[];
|
|
1301
1444
|
psp_id: string;
|
|
1302
|
-
rail:
|
|
1445
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1303
1446
|
accepts: string[];
|
|
1304
1447
|
failed_attempts: number;
|
|
1305
1448
|
requires?: string[];
|
|
@@ -1327,6 +1470,7 @@ export type OrderPreviewLine = {
|
|
|
1327
1470
|
amount: string;
|
|
1328
1471
|
ownership: "consumable" | "extend" | "unique";
|
|
1329
1472
|
billing_interval_hours: number | null;
|
|
1473
|
+
billing_interval_months: number | null;
|
|
1330
1474
|
access_duration_hours: number | null;
|
|
1331
1475
|
refusal: OrderLineRefusal | null;
|
|
1332
1476
|
};
|
|
@@ -1343,6 +1487,7 @@ export type OrderRenewal = {
|
|
|
1343
1487
|
period_starts_at: string;
|
|
1344
1488
|
period_ends_at: string;
|
|
1345
1489
|
due_at: string;
|
|
1490
|
+
checkout_order_id: string | null;
|
|
1346
1491
|
};
|
|
1347
1492
|
export type OrderUsage = {
|
|
1348
1493
|
period_starts_at: string;
|
|
@@ -1362,7 +1507,7 @@ export type PSP = {
|
|
|
1362
1507
|
id: string;
|
|
1363
1508
|
key: string;
|
|
1364
1509
|
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1365
|
-
environment:
|
|
1510
|
+
environment: "devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet";
|
|
1366
1511
|
archived: boolean;
|
|
1367
1512
|
open_obligations: number;
|
|
1368
1513
|
gateway_id?: string;
|
|
@@ -1388,7 +1533,7 @@ export type PSPCredential = {
|
|
|
1388
1533
|
export type PSPImport = {
|
|
1389
1534
|
id: string;
|
|
1390
1535
|
psp: string;
|
|
1391
|
-
rail:
|
|
1536
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1392
1537
|
status: "applied" | "applying" | "failed" | "pulled" | "pulling";
|
|
1393
1538
|
history_since: string | null;
|
|
1394
1539
|
history_through: string | null;
|
|
@@ -1460,13 +1605,13 @@ export type PSPImportRule = {
|
|
|
1460
1605
|
export type PSPPaymentConfig = {
|
|
1461
1606
|
psp_id: string;
|
|
1462
1607
|
key: string;
|
|
1463
|
-
rail:
|
|
1608
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1464
1609
|
custodian: string;
|
|
1465
1610
|
display_name: string;
|
|
1466
1611
|
flow: string;
|
|
1467
1612
|
routed: boolean;
|
|
1468
1613
|
config?: Record<string, string>;
|
|
1469
|
-
status?:
|
|
1614
|
+
status?: "temporarily_unavailable";
|
|
1470
1615
|
retry_after?: number;
|
|
1471
1616
|
};
|
|
1472
1617
|
export type PSPRef = {
|
|
@@ -1505,7 +1650,7 @@ export type PackagePrice = {
|
|
|
1505
1650
|
export type ParkedSubscription = {
|
|
1506
1651
|
id: string;
|
|
1507
1652
|
psp: string;
|
|
1508
|
-
rail:
|
|
1653
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1509
1654
|
subscription_ref: string;
|
|
1510
1655
|
reason: "customer_unlinked" | "price_unmapped" | "product_held";
|
|
1511
1656
|
price_ref: string | null;
|
|
@@ -1536,13 +1681,14 @@ export type Payment = {
|
|
|
1536
1681
|
order_id: string | null;
|
|
1537
1682
|
quantity: number | null;
|
|
1538
1683
|
channel: "manual" | "rail";
|
|
1539
|
-
rail:
|
|
1684
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe" | null;
|
|
1540
1685
|
psp_id: string | null;
|
|
1541
1686
|
transaction_id: string;
|
|
1542
1687
|
card: CardDetails | null;
|
|
1543
1688
|
failure: PaymentFailure | null;
|
|
1544
1689
|
refunded_payment_id: string | null;
|
|
1545
1690
|
reason: string | null;
|
|
1691
|
+
refund_reason: "charged_after_cancel" | "dispute_prevention" | "duplicate" | "fraud_warning" | "fraudulent" | "other" | "requested_by_customer" | "unknown" | null;
|
|
1546
1692
|
refunds: Payment[];
|
|
1547
1693
|
created_at: string;
|
|
1548
1694
|
};
|
|
@@ -1553,20 +1699,23 @@ export type PaymentAttempt = {
|
|
|
1553
1699
|
card_entry: string;
|
|
1554
1700
|
source: string;
|
|
1555
1701
|
observed_via: string;
|
|
1556
|
-
|
|
1557
|
-
|
|
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";
|
|
1558
1705
|
action: string;
|
|
1559
1706
|
response_code: string;
|
|
1560
1707
|
response_text: string;
|
|
1561
1708
|
issuer_code: string;
|
|
1562
1709
|
issuer_text: string;
|
|
1710
|
+
advice_code: string;
|
|
1711
|
+
network_advice_code: string;
|
|
1563
1712
|
avs_result: string;
|
|
1564
1713
|
cvv_result: string;
|
|
1565
1714
|
card: CardDetails | null;
|
|
1566
1715
|
card_bin: string;
|
|
1567
1716
|
token_type: string;
|
|
1568
1717
|
transaction_id: string;
|
|
1569
|
-
rail:
|
|
1718
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1570
1719
|
psp_id: string;
|
|
1571
1720
|
customer_id: string;
|
|
1572
1721
|
amount: string;
|
|
@@ -1582,19 +1731,20 @@ export type PaymentAttempt = {
|
|
|
1582
1731
|
};
|
|
1583
1732
|
export type PaymentConfig = {
|
|
1584
1733
|
psps: PSPPaymentConfig[];
|
|
1734
|
+
billing_fields: BillingFieldSettings;
|
|
1585
1735
|
solana: SolanaPaymentConfig | null;
|
|
1586
1736
|
};
|
|
1587
1737
|
export type PaymentFailure = {
|
|
1588
|
-
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";
|
|
1589
1739
|
message: string;
|
|
1590
|
-
field?:
|
|
1740
|
+
field?: "cvc" | "expiry" | "number" | "postal_code";
|
|
1591
1741
|
};
|
|
1592
1742
|
export type PaymentMethod = {
|
|
1593
1743
|
id: string;
|
|
1594
1744
|
customer_id: string;
|
|
1595
|
-
rail:
|
|
1745
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1596
1746
|
psp_id: string | null;
|
|
1597
|
-
status: "active" | "closed" | "removed" | "replaced" | "requires_action";
|
|
1747
|
+
status: "active" | "closed" | "disputed" | "removed" | "replaced" | "requires_action";
|
|
1598
1748
|
next_action: NextAction | null;
|
|
1599
1749
|
replaced_by: string | null;
|
|
1600
1750
|
card: CardDetails | null;
|
|
@@ -1614,7 +1764,7 @@ export type PaymentMethodHealth = {
|
|
|
1614
1764
|
active: boolean;
|
|
1615
1765
|
};
|
|
1616
1766
|
export type PaymentMethodRef = {
|
|
1617
|
-
rail?:
|
|
1767
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1618
1768
|
rail_customer_ref?: string;
|
|
1619
1769
|
rail_method_ref?: string;
|
|
1620
1770
|
};
|
|
@@ -1624,7 +1774,7 @@ export type PaymentMethodSubscription = {
|
|
|
1624
1774
|
created_at: string;
|
|
1625
1775
|
};
|
|
1626
1776
|
export type PaymentRecovery = {
|
|
1627
|
-
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";
|
|
1628
1778
|
retryable: boolean;
|
|
1629
1779
|
blocked_reason?: string;
|
|
1630
1780
|
order_id?: string;
|
|
@@ -1639,6 +1789,11 @@ export type PerUnitPrice = {
|
|
|
1639
1789
|
export type PlatformVaultState = {
|
|
1640
1790
|
available: boolean;
|
|
1641
1791
|
};
|
|
1792
|
+
export type PreviewMessageParams = {
|
|
1793
|
+
event_type?: string;
|
|
1794
|
+
language?: string;
|
|
1795
|
+
template?: MessageTemplate | null;
|
|
1796
|
+
};
|
|
1642
1797
|
export type PreviewMyOrderParams = {
|
|
1643
1798
|
lines?: OrderLineParams[];
|
|
1644
1799
|
cart?: boolean;
|
|
@@ -1672,22 +1827,17 @@ export type Price = {
|
|
|
1672
1827
|
billing_interval_months: number | null;
|
|
1673
1828
|
trial_unit_amount: string | null;
|
|
1674
1829
|
trial_duration_hours: number | null;
|
|
1675
|
-
sell_via:
|
|
1830
|
+
sell_via: ("card" | "solana")[];
|
|
1676
1831
|
provider: PriceProvider | null;
|
|
1677
1832
|
solana_plan: string | null;
|
|
1678
1833
|
created_at: string;
|
|
1679
1834
|
updated_at: string;
|
|
1680
1835
|
};
|
|
1681
|
-
export type
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
currency: string;
|
|
1687
|
-
affected_count: number;
|
|
1688
|
-
review_text: string;
|
|
1689
|
-
create_price: CreatePriceParams;
|
|
1690
|
-
migration: CreatePriceMigrationParams | null;
|
|
1836
|
+
export type PriceBound = {
|
|
1837
|
+
meter: string;
|
|
1838
|
+
cell: string | null;
|
|
1839
|
+
unit_amount: string;
|
|
1840
|
+
divide_by: string;
|
|
1691
1841
|
};
|
|
1692
1842
|
export type PriceKeyMovement = {
|
|
1693
1843
|
effective_at: string;
|
|
@@ -1710,6 +1860,8 @@ export type PriceMigration = {
|
|
|
1710
1860
|
blocked: number;
|
|
1711
1861
|
created_at: string;
|
|
1712
1862
|
canceled_at: string | null;
|
|
1863
|
+
preparing: boolean;
|
|
1864
|
+
warnings: string[];
|
|
1713
1865
|
};
|
|
1714
1866
|
export type PriceMigrationCancel = {
|
|
1715
1867
|
price_migration: PriceMigration;
|
|
@@ -1718,7 +1870,7 @@ export type PriceMigrationCancel = {
|
|
|
1718
1870
|
};
|
|
1719
1871
|
export type PriceMigrationOutcome = {
|
|
1720
1872
|
subscription_id: string;
|
|
1721
|
-
rail:
|
|
1873
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1722
1874
|
disposition: "blocked" | "scheduled" | "skipped";
|
|
1723
1875
|
reason: string | null;
|
|
1724
1876
|
};
|
|
@@ -1726,6 +1878,7 @@ export type PriceMigrationPreview = {
|
|
|
1726
1878
|
to_price_id: string | null;
|
|
1727
1879
|
effective_at: string;
|
|
1728
1880
|
matched: number;
|
|
1881
|
+
classified: number;
|
|
1729
1882
|
scheduled: number;
|
|
1730
1883
|
skipped: number;
|
|
1731
1884
|
blocked: number;
|
|
@@ -1741,7 +1894,7 @@ export type PriceProvider = {
|
|
|
1741
1894
|
access_duration_default: boolean;
|
|
1742
1895
|
psp: string;
|
|
1743
1896
|
psp_id: string;
|
|
1744
|
-
rail:
|
|
1897
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1745
1898
|
ids: Record<string, string> | null;
|
|
1746
1899
|
retired: boolean;
|
|
1747
1900
|
sync_status: "drifted" | "in_sync" | "missing" | "sync_disabled" | "unknown";
|
|
@@ -1795,7 +1948,7 @@ export type ProductSummary = {
|
|
|
1795
1948
|
archived: boolean;
|
|
1796
1949
|
};
|
|
1797
1950
|
export type ProposalError = {
|
|
1798
|
-
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";
|
|
1799
1952
|
message: string;
|
|
1800
1953
|
};
|
|
1801
1954
|
export type ProposalResult = {
|
|
@@ -1843,6 +1996,7 @@ export type PublicConfig = {
|
|
|
1843
1996
|
currencies: CurrencyUnits[];
|
|
1844
1997
|
rails: RailDefinition[];
|
|
1845
1998
|
captcha: CaptchaConfig | null;
|
|
1999
|
+
usage: boolean;
|
|
1846
2000
|
};
|
|
1847
2001
|
export type PublicMerchant = {
|
|
1848
2002
|
display_name: string;
|
|
@@ -1853,25 +2007,27 @@ export type PublicMerchant = {
|
|
|
1853
2007
|
statement_descriptor: string | null;
|
|
1854
2008
|
embed_origins: string[];
|
|
1855
2009
|
};
|
|
1856
|
-
export type PutCustodianParams = {
|
|
1857
|
-
expected_revision?: number;
|
|
1858
|
-
kind?: string;
|
|
1859
|
-
environment?: string;
|
|
1860
|
-
account_id?: string;
|
|
1861
|
-
settings?: Record<string, unknown>;
|
|
1862
|
-
credentials?: Record<string, string>;
|
|
1863
|
-
};
|
|
1864
2010
|
export type Quantity = {
|
|
1865
2011
|
min: number;
|
|
1866
2012
|
max: number;
|
|
1867
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
|
+
};
|
|
1868
2024
|
export type RailDefinition = {
|
|
1869
2025
|
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1870
2026
|
display_name: string;
|
|
1871
2027
|
account_fields: string[];
|
|
1872
2028
|
fields: string[];
|
|
1873
2029
|
credential_keys: string[];
|
|
1874
|
-
environments:
|
|
2030
|
+
environments: ("devnet" | "live" | "mainnet" | "sandbox" | "test" | "testnet")[];
|
|
1875
2031
|
};
|
|
1876
2032
|
export type RateCard = {
|
|
1877
2033
|
ordinal?: number;
|
|
@@ -1900,42 +2056,28 @@ export type RecordExternalPaymentParams = {
|
|
|
1900
2056
|
transaction_id?: string;
|
|
1901
2057
|
paid_at?: string;
|
|
1902
2058
|
};
|
|
1903
|
-
export type RecordUsageBatchParams = {
|
|
1904
|
-
items?: RecordUsageParams[];
|
|
1905
|
-
};
|
|
1906
|
-
export type RecordUsageBatchResult = {
|
|
1907
|
-
items: UsageEventResult[];
|
|
1908
|
-
};
|
|
1909
|
-
export type RecordUsageParams = {
|
|
1910
|
-
customer_id?: string;
|
|
1911
|
-
invoker?: string;
|
|
1912
|
-
invoker_type?: "customer" | "delegated";
|
|
1913
|
-
currency?: string;
|
|
1914
|
-
event_type?: string;
|
|
1915
|
-
dimensions?: Record<string, number>;
|
|
1916
|
-
amount?: string;
|
|
1917
|
-
outcome?: "failed" | "succeeded";
|
|
1918
|
-
resource?: string;
|
|
1919
|
-
metadata?: Record<string, unknown>;
|
|
1920
|
-
source?: string;
|
|
1921
|
-
source_id?: string;
|
|
1922
|
-
occurred_at?: string;
|
|
1923
|
-
};
|
|
1924
2059
|
export type RefundPaymentParams = {
|
|
1925
2060
|
amount?: string;
|
|
1926
2061
|
full?: boolean;
|
|
1927
2062
|
reason?: string;
|
|
2063
|
+
refund_reason?: "charged_after_cancel" | "dispute_prevention" | "duplicate" | "fraud_warning" | "fraudulent" | "other" | "requested_by_customer" | "unknown";
|
|
1928
2064
|
revoke_access?: boolean;
|
|
1929
2065
|
};
|
|
1930
|
-
export type
|
|
1931
|
-
|
|
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;
|
|
1932
2074
|
};
|
|
1933
2075
|
export type Renewal = {
|
|
1934
2076
|
id: string;
|
|
1935
2077
|
subscription_id: string;
|
|
1936
2078
|
customer_id: string;
|
|
1937
2079
|
psp_id: string;
|
|
1938
|
-
rail:
|
|
2080
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
1939
2081
|
owner: string;
|
|
1940
2082
|
due_at: string;
|
|
1941
2083
|
amount: string;
|
|
@@ -1990,16 +2132,36 @@ export type ScheduledChange = {
|
|
|
1990
2132
|
price?: Price;
|
|
1991
2133
|
product?: ProductSummary;
|
|
1992
2134
|
};
|
|
2135
|
+
export type ScheduledMRR = {
|
|
2136
|
+
kind: "churn" | "contraction" | "expansion";
|
|
2137
|
+
amount: string;
|
|
2138
|
+
effective_at: string;
|
|
2139
|
+
};
|
|
1993
2140
|
export type SetCartLineParams = {
|
|
1994
2141
|
quantity?: number;
|
|
1995
2142
|
amount?: string;
|
|
1996
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
|
+
};
|
|
1997
2152
|
export type SetDashboardParams = {
|
|
1998
2153
|
widgets?: DashboardWidget[];
|
|
1999
2154
|
};
|
|
2000
2155
|
export type SetDefaultPaymentMethodParams = {
|
|
2001
2156
|
payment_method_id?: string;
|
|
2002
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
|
+
};
|
|
2003
2165
|
export type SetLowBalanceLineParams = {
|
|
2004
2166
|
amount?: string | null;
|
|
2005
2167
|
runway_hours?: number | null;
|
|
@@ -2071,8 +2233,10 @@ export type Subscription = {
|
|
|
2071
2233
|
product_id: string;
|
|
2072
2234
|
price_id: string;
|
|
2073
2235
|
quantity: number | null;
|
|
2236
|
+
mrr: SubscriptionMRR | null;
|
|
2237
|
+
mrr_risk: MRRRisk | null;
|
|
2074
2238
|
psp_id: string;
|
|
2075
|
-
rail:
|
|
2239
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2076
2240
|
rail_subscription_id: string | null;
|
|
2077
2241
|
status: "active" | "awaiting_method" | "canceled" | "past_due" | "pending" | "unverified";
|
|
2078
2242
|
scheduled_change: ScheduledChange | null;
|
|
@@ -2103,7 +2267,7 @@ export type SubscriptionAccess = {
|
|
|
2103
2267
|
source_type?: string;
|
|
2104
2268
|
source_id?: string;
|
|
2105
2269
|
subscription_id?: string;
|
|
2106
|
-
rail?:
|
|
2270
|
+
rail?: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2107
2271
|
starts_at: string;
|
|
2108
2272
|
ends_at?: string;
|
|
2109
2273
|
};
|
|
@@ -2112,7 +2276,7 @@ export type SubscriptionChange = {
|
|
|
2112
2276
|
effective?: string;
|
|
2113
2277
|
price_id: string;
|
|
2114
2278
|
quantity: number | null;
|
|
2115
|
-
rail:
|
|
2279
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2116
2280
|
subscription_id?: string;
|
|
2117
2281
|
next_action?: NextAction;
|
|
2118
2282
|
transaction_id: string | null;
|
|
@@ -2132,7 +2296,7 @@ export type SubscriptionChangePreview = {
|
|
|
2132
2296
|
effective: string;
|
|
2133
2297
|
price_id: string;
|
|
2134
2298
|
quantity: number | null;
|
|
2135
|
-
rail:
|
|
2299
|
+
rail: "ccbill" | "nmi" | "solana" | "stripe";
|
|
2136
2300
|
currency: string;
|
|
2137
2301
|
amount_due_now: string;
|
|
2138
2302
|
next_charge_amount: string;
|
|
@@ -2148,7 +2312,7 @@ export type SubscriptionDunning = {
|
|
|
2148
2312
|
next_retry_at: string | null;
|
|
2149
2313
|
final_retry_at: string | null;
|
|
2150
2314
|
waiting_for_new_card: boolean;
|
|
2151
|
-
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;
|
|
2152
2316
|
};
|
|
2153
2317
|
export type SubscriptionHistory = {
|
|
2154
2318
|
events: ListPage<SubscriptionHistoryEntry>;
|
|
@@ -2157,7 +2321,8 @@ export type SubscriptionHistory = {
|
|
|
2157
2321
|
export type SubscriptionHistoryAttempt = {
|
|
2158
2322
|
id: string;
|
|
2159
2323
|
kind: string;
|
|
2160
|
-
|
|
2324
|
+
outcome: "approved" | "declined" | "error" | "refused";
|
|
2325
|
+
decline_cause?: "customer" | "fraud" | "issuer" | "merchant" | "processing" | "unknown";
|
|
2161
2326
|
reason?: string;
|
|
2162
2327
|
action?: string;
|
|
2163
2328
|
source: string;
|
|
@@ -2223,11 +2388,36 @@ export type SubscriptionHistoryTransition = {
|
|
|
2223
2388
|
from_period_end: string | null;
|
|
2224
2389
|
to_period_end: string | null;
|
|
2225
2390
|
};
|
|
2391
|
+
export type SubscriptionMRR = {
|
|
2392
|
+
amount: string;
|
|
2393
|
+
currency: string;
|
|
2394
|
+
scheduled: ScheduledMRR | null;
|
|
2395
|
+
};
|
|
2226
2396
|
export type SubscriptionRetryNowResult = {
|
|
2227
2397
|
subscription: Subscription;
|
|
2228
2398
|
status: string;
|
|
2229
2399
|
replayed: boolean;
|
|
2230
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
|
+
};
|
|
2231
2421
|
export type TieredPrice = {
|
|
2232
2422
|
mode?: "graduated" | "volume";
|
|
2233
2423
|
tiers?: RateTier[];
|
|
@@ -2247,6 +2437,7 @@ export type UpdateCustomerParams = {
|
|
|
2247
2437
|
credit_limits?: CreditLimit[];
|
|
2248
2438
|
trust_levels?: TrustLevel[];
|
|
2249
2439
|
low_balance_lines?: LowBalanceLine[];
|
|
2440
|
+
limits?: LimitOverride[];
|
|
2250
2441
|
billing_policy?: string | null;
|
|
2251
2442
|
invoice_profile?: InvoiceProfile | null;
|
|
2252
2443
|
};
|
|
@@ -2255,23 +2446,23 @@ export type UpdateMerchantConfigurationParams = {
|
|
|
2255
2446
|
display_name?: string;
|
|
2256
2447
|
usage_billing?: UsageBillingSettings;
|
|
2257
2448
|
profile?: MerchantProfile;
|
|
2258
|
-
collection_threshold?: string;
|
|
2259
|
-
monthly_floor?: string;
|
|
2260
2449
|
billing_period_boundary?: string;
|
|
2261
2450
|
alert_email?: string;
|
|
2262
2451
|
reprice_notice_window_days?: number;
|
|
2263
|
-
provider_refund_access?:
|
|
2452
|
+
provider_refund_access?: "keep" | "revoke_on_any" | "revoke_on_full";
|
|
2453
|
+
fraud_warning_refund?: "record" | "refund";
|
|
2264
2454
|
arrears_grace_days?: number;
|
|
2265
|
-
arrears_delinquency_floor?: string;
|
|
2266
2455
|
psp_routing?: PSPRoutingRule[];
|
|
2267
2456
|
dunning_policy?: DunningPolicy;
|
|
2268
2457
|
checkout?: MerchantCheckoutSettings;
|
|
2269
2458
|
balance_notices?: BalanceNoticeSettings;
|
|
2459
|
+
accounting?: AccountingSettings;
|
|
2270
2460
|
card_vault?: string;
|
|
2271
2461
|
charge_psps?: string[];
|
|
2272
2462
|
billing_policies?: BillingPolicy[];
|
|
2273
2463
|
billing_policy_bindings?: BillingPolicyBinding[];
|
|
2274
2464
|
delegated_invoker_wasted_spend_limits?: BudgetWindow[];
|
|
2465
|
+
currencies?: MerchantCurrency[];
|
|
2275
2466
|
};
|
|
2276
2467
|
export type UpdatePSPImportParams = {
|
|
2277
2468
|
rules?: PSPImportRule[];
|
|
@@ -2294,7 +2485,7 @@ export type UpdatePaymentMethodParams = {
|
|
|
2294
2485
|
};
|
|
2295
2486
|
export type UpdatePriceParams = {
|
|
2296
2487
|
archived?: boolean | null;
|
|
2297
|
-
sell_via?:
|
|
2488
|
+
sell_via?: ("card" | "solana")[] | null;
|
|
2298
2489
|
expected_revision?: number;
|
|
2299
2490
|
};
|
|
2300
2491
|
export type UpdateProductParams = {
|
|
@@ -2314,7 +2505,7 @@ export type Usage = {
|
|
|
2314
2505
|
currency: string;
|
|
2315
2506
|
from: string;
|
|
2316
2507
|
to: string;
|
|
2317
|
-
group_by: "event_type" | "invoker" | "meter"
|
|
2508
|
+
group_by: "event_type" | "invoker" | "meter";
|
|
2318
2509
|
rows: UsageRow[];
|
|
2319
2510
|
next_cursor: string | null;
|
|
2320
2511
|
};
|
|
@@ -2333,56 +2524,102 @@ export type UsageBillingCurrency = {
|
|
|
2333
2524
|
currency: string;
|
|
2334
2525
|
credit_limit: string;
|
|
2335
2526
|
minimum_invoice_amount: string;
|
|
2527
|
+
collection_threshold: string | null;
|
|
2528
|
+
delinquency_floor: string | null;
|
|
2336
2529
|
};
|
|
2337
2530
|
export type UsageBillingSettings = {
|
|
2338
2531
|
billing_day: number;
|
|
2339
2532
|
currencies: UsageBillingCurrency[];
|
|
2340
2533
|
};
|
|
2341
|
-
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 = {
|
|
2342
2542
|
meter_key: string;
|
|
2343
|
-
model: "dynamic" | "flat" | "package" | "per_unit" | "tiered";
|
|
2344
2543
|
cell: string | null;
|
|
2544
|
+
requests: number;
|
|
2345
2545
|
quantity: number;
|
|
2346
2546
|
amount: string;
|
|
2347
2547
|
};
|
|
2348
|
-
export type
|
|
2349
|
-
|
|
2350
|
-
|
|
2351
|
-
|
|
2352
|
-
|
|
2548
|
+
export type UsageRow = {
|
|
2549
|
+
key: string;
|
|
2550
|
+
cell: string | null;
|
|
2551
|
+
event_count: number;
|
|
2552
|
+
amount: string;
|
|
2553
|
+
quantity: number | null;
|
|
2353
2554
|
};
|
|
2354
|
-
export type
|
|
2355
|
-
id: string;
|
|
2555
|
+
export type View = {
|
|
2356
2556
|
customer_id: string;
|
|
2357
|
-
|
|
2557
|
+
currency: string;
|
|
2558
|
+
as_of: string;
|
|
2559
|
+
limits: ViewLimit[];
|
|
2560
|
+
};
|
|
2561
|
+
export type ViewCount = {
|
|
2562
|
+
limit: string;
|
|
2563
|
+
meter: string;
|
|
2564
|
+
event_type: string;
|
|
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;
|
|
2596
|
+
};
|
|
2597
|
+
export type ViewPricing = {
|
|
2358
2598
|
currency: string;
|
|
2359
2599
|
event_type: string;
|
|
2360
|
-
|
|
2361
|
-
|
|
2362
|
-
|
|
2363
|
-
forgiven_amount: string;
|
|
2364
|
-
resource: string | null;
|
|
2365
|
-
metadata: Record<string, unknown> | null;
|
|
2366
|
-
source: string;
|
|
2367
|
-
source_id: string;
|
|
2368
|
-
charges: UsageCharge[];
|
|
2369
|
-
balance_transaction_id: string | null;
|
|
2370
|
-
occurred_at: string;
|
|
2371
|
-
created_at: string;
|
|
2372
|
-
replayed: boolean;
|
|
2600
|
+
counts: ViewCount[];
|
|
2601
|
+
rate_cards: ViewRateCard[];
|
|
2602
|
+
price_bounds: PriceBound[];
|
|
2373
2603
|
};
|
|
2374
|
-
export type
|
|
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;
|
|
2375
2616
|
status: number;
|
|
2376
|
-
event: UsageEvent | null;
|
|
2377
2617
|
error: ErrorDetails | null;
|
|
2378
2618
|
};
|
|
2379
|
-
export type
|
|
2380
|
-
|
|
2381
|
-
|
|
2382
|
-
|
|
2383
|
-
amount: string;
|
|
2384
|
-
quantity: number | null;
|
|
2385
|
-
dimensions: Record<string, number> | null;
|
|
2619
|
+
export type ViewWindow = {
|
|
2620
|
+
starts_at: string | null;
|
|
2621
|
+
ends_at: string | null;
|
|
2622
|
+
remaining: string;
|
|
2386
2623
|
};
|
|
2387
2624
|
export type WebhookReceipt = {
|
|
2388
2625
|
status: string;
|