@peable.to/contracts 2.0.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. package/dist/cjs/resources/catalog/index.js +1 -5
  2. package/dist/cjs/resources/checkout/checkoutSessions.js +0 -4
  3. package/dist/cjs/resources/events/events.js +1 -32
  4. package/dist/cjs/vocabulary/catalog.js +1 -17
  5. package/dist/cjs/vocabulary/errors.js +0 -13
  6. package/dist/cjs/vocabulary/events.js +0 -1
  7. package/dist/esm/resources/catalog/index.js +1 -5
  8. package/dist/esm/resources/checkout/checkoutSessions.js +0 -4
  9. package/dist/esm/resources/events/events.js +0 -31
  10. package/dist/esm/vocabulary/catalog.js +0 -16
  11. package/dist/esm/vocabulary/errors.js +0 -13
  12. package/dist/esm/vocabulary/events.js +0 -1
  13. package/dist/types/resources/catalog/index.d.ts +1 -851
  14. package/dist/types/resources/checkout/checkoutSessions.d.ts +13 -61
  15. package/dist/types/resources/checkout/index.d.ts +10 -46
  16. package/dist/types/resources/events/events.d.ts +0 -22
  17. package/dist/types/resources/events/index.d.ts +2 -15
  18. package/dist/types/resources/events/webhookDeliveries.d.ts +0 -3
  19. package/dist/types/resources/events/webhookEndpoints.d.ts +4 -16
  20. package/dist/types/resources/payments/index.d.ts +10 -10
  21. package/dist/types/resources/payments/paymentIntents.d.ts +10 -10
  22. package/dist/types/resources/payments/testHelpers.d.ts +1 -1
  23. package/dist/types/resources/tax/index.d.ts +1 -1
  24. package/dist/types/resources/tax/registrations.d.ts +2 -2
  25. package/dist/types/vocabulary/catalog.d.ts +0 -9
  26. package/dist/types/vocabulary/errors.d.ts +0 -13
  27. package/dist/types/vocabulary/events.d.ts +0 -1
  28. package/package.json +1 -1
  29. package/dist/cjs/resources/catalog/billing.js +0 -753
  30. package/dist/esm/resources/catalog/billing.js +0 -750
  31. package/dist/types/resources/catalog/billing.d.ts +0 -1723
@@ -17,7 +17,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
17
17
  exports.catalogRoutes = exports.queryIdList = exports.queryFlag = exports.baseUnitAmountParam = void 0;
18
18
  // Contracts of this group: one module per resource, re-exported here, and
19
19
  // their routes concatenated into `catalogRoutes`.
20
- const billing_1 = require("./billing");
21
20
  const billingSettings_1 = require("./billingSettings");
22
21
  const coupons_1 = require("./coupons");
23
22
  const entitlements_1 = require("./entitlements");
@@ -26,7 +25,6 @@ const prices_1 = require("./prices");
26
25
  const products_1 = require("./products");
27
26
  const promotionCodes_1 = require("./promotionCodes");
28
27
  const testClocks_1 = require("./testClocks");
29
- __exportStar(require("./billing"), exports);
30
28
  __exportStar(require("./billingSettings"), exports);
31
29
  __exportStar(require("./coupons"), exports);
32
30
  __exportStar(require("./entitlements"), exports);
@@ -42,8 +40,7 @@ Object.defineProperty(exports, "queryFlag", { enumerable: true, get: function ()
42
40
  Object.defineProperty(exports, "queryIdList", { enumerable: true, get: function () { return shared_1.queryIdList; } });
43
41
  /**
44
42
  * The catalog (products, prices, coupons, promotion codes), entitlements, the
45
- * billing engine's platform objects (test clocks, billing settings, meters)
46
- * and the recurring billing transport (`/v1/billing/*`).
43
+ * billing engine's platform objects (test clocks, billing settings, meters).
47
44
  */
48
45
  exports.catalogRoutes = [
49
46
  ...products_1.productRoutes,
@@ -54,5 +51,4 @@ exports.catalogRoutes = [
54
51
  ...testClocks_1.testClockRoutes,
55
52
  ...billingSettings_1.billingSettingsRoutes,
56
53
  ...meters_1.meterRoutes,
57
- ...billing_1.billingRoutes,
58
54
  ];
@@ -4,7 +4,6 @@ exports.checkoutSessionRoutes = exports.expireCheckoutSessionTestHelperParams =
4
4
  const zod_1 = require("zod");
5
5
  const catalog_1 = require("../../vocabulary/catalog");
6
6
  const payments_1 = require("../../vocabulary/payments");
7
- const billing_1 = require("../catalog/billing");
8
7
  const objects_1 = require("../../common/objects");
9
8
  const envelopes_1 = require("../../common/envelopes");
10
9
  const objects_2 = require("../../common/objects");
@@ -183,9 +182,6 @@ exports.checkoutSessionPublicSchema = (0, objects_2.defineComponent)('CheckoutSe
183
182
  .string()
184
183
  .nullable()
185
184
  .describe("The card provider's PUBLIC key for this session's mode, so the payment fields can mount before the payment exists. `null` on FairCoin."),
186
- billing_quote: billing_1.billingFaircoinFxQuoteSchema
187
- .optional()
188
- .describe('FairCoin billing invoices: the frozen USD price and FAIR settlement quote.'),
189
185
  })
190
186
  .strict());
191
187
  // ---- Merchant create/update ---------------------------------------------------
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.eventRoutes = exports.WEBHOOK_EVENT_DESCRIPTIONS = exports.streamEventsQuery = exports.retrieveEventQuery = exports.listEventsQuery = exports.listEventsFilters = exports.eventSchema = exports.eventRequestSchema = exports.billingObservationSchema = void 0;
3
+ exports.eventRoutes = exports.WEBHOOK_EVENT_DESCRIPTIONS = exports.streamEventsQuery = exports.retrieveEventQuery = exports.listEventsQuery = exports.listEventsFilters = exports.eventSchema = exports.eventRequestSchema = void 0;
4
4
  exports.eventSchemaOf = eventSchemaOf;
5
5
  const zod_1 = require("zod");
6
6
  const envelopes_1 = require("../../common/envelopes");
@@ -16,36 +16,6 @@ const events_1 = require("../../vocabulary/events");
16
16
  * every matching webhook endpoint: a delivery's body and `GET /v1/events/:id`
17
17
  * are byte for byte the same object.
18
18
  */
19
- /**
20
- * The payload of `billing.observation.updated`: a wake-up, never paid or grant
21
- * authority. Re-read the owner-bound resource it names.
22
- */
23
- exports.billingObservationSchema = (0, objects_1.defineObject)('billing_observation', 'BillingObservation', zod_1.z
24
- .object({
25
- object: zod_1.z.literal('billing_observation'),
26
- livemode: primitives_1.livemode.describe('The mode of the billing cohort observed (ADR 0017).'),
27
- resource_kind: zod_1.z.enum(['subscription', 'invoice']),
28
- resource_id: zod_1.z.string().describe('The provider subscription or invoice observed.'),
29
- subscription_id: zod_1.z
30
- .string()
31
- .optional()
32
- .describe('Owner-scoped wake-up hint only; re-read the subscription before resolving a payer.'),
33
- revision: zod_1.z.number().int().describe('The observation revision; later revisions are newer.'),
34
- observed_at: primitives_1.unixSeconds,
35
- })
36
- .strict(), {
37
- examples: [
38
- {
39
- object: 'billing_observation',
40
- livemode: false,
41
- resource_kind: 'subscription',
42
- resource_id: 'sub_1Q2w3E4r5T6y7U8i',
43
- subscription_id: 'sub_1Q2w3E4r5T6y7U8i',
44
- revision: 3,
45
- observed_at: 1793750400,
46
- },
47
- ],
48
- });
49
19
  /**
50
20
  * What caused an event, when an API request did (Stripe's `event.request`).
51
21
  * Both `null` for an event caused by something else — the chain watcher, the
@@ -242,7 +212,6 @@ exports.WEBHOOK_EVENT_DESCRIPTIONS = {
242
212
  'setup_intent.succeeded': 'A SetupIntent succeeded: its PaymentMethod is saved.',
243
213
  'setup_intent.setup_failed': 'A SetupIntent attempt failed.',
244
214
  'setup_intent.canceled': 'A SetupIntent was canceled.',
245
- 'billing.observation.updated': 'A recurring billing resource was observed to change. A wake-up only: re-read the resource.',
246
215
  'connected_account.updated': "A seller's connected account changed — its readiness, in practice.",
247
216
  'product.created': 'A Product was created.',
248
217
  'product.updated': 'A Product was updated; `previous_attributes` names what moved.',
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.BILLING_RAIL_RENEWALS = exports.BILLING_RAIL_SETTLEMENTS = exports.BILLING_SUBSCRIPTION_STATUSES = exports.METER_STATUSES = exports.METER_AGGREGATIONS = exports.BILLING_SETTINGS_LIMITS = exports.DUNNING_INVOICE_ACTIONS = exports.DUNNING_FINAL_ACTIONS = exports.TEST_CLOCK_STATUSES = exports.RECURRING_INTERVAL_COUNT_MAX = exports.CATALOG_MAX_WHOLE_UNITS = exports.CATALOG_LIMITS = exports.COUPON_DURATIONS = exports.TRANSFORM_QUANTITY_ROUNDS = exports.PRICE_TAX_BEHAVIORS = exports.RECURRING_USAGE_TYPES = exports.RECURRING_INTERVALS = exports.PRICE_TYPES = exports.PRICE_TIERS_MODES = exports.PRICE_BILLING_SCHEMES = void 0;
3
+ exports.METER_STATUSES = exports.METER_AGGREGATIONS = exports.BILLING_SETTINGS_LIMITS = exports.DUNNING_INVOICE_ACTIONS = exports.DUNNING_FINAL_ACTIONS = exports.TEST_CLOCK_STATUSES = exports.RECURRING_INTERVAL_COUNT_MAX = exports.CATALOG_MAX_WHOLE_UNITS = exports.CATALOG_LIMITS = exports.COUPON_DURATIONS = exports.TRANSFORM_QUANTITY_ROUNDS = exports.PRICE_TAX_BEHAVIORS = exports.RECURRING_USAGE_TYPES = exports.RECURRING_INTERVALS = exports.PRICE_TYPES = exports.PRICE_TIERS_MODES = exports.PRICE_BILLING_SCHEMES = void 0;
4
4
  exports.maxBaseUnits = maxBaseUnits;
5
5
  // The catalog's and the billing engine platform's closed value sets (ADR 0016,
6
6
  // ADR 0018): what a price, a coupon, a test clock, a meter and the billing
@@ -91,20 +91,4 @@ exports.BILLING_SETTINGS_LIMITS = Object.freeze({
91
91
  /** How a meter combines a period's events into the quantity billed. */
92
92
  exports.METER_AGGREGATIONS = ['sum', 'count', 'last'];
93
93
  exports.METER_STATUSES = ['active', 'inactive'];
94
- // ---- Recurring billing transport (`/v1/billing/*`) ---------------------------
95
- /** A provider subscription's status, as the recurring transport observes it. */
96
- exports.BILLING_SUBSCRIPTION_STATUSES = [
97
- 'incomplete',
98
- 'incomplete_expired',
99
- 'trialing',
100
- 'active',
101
- 'past_due',
102
- 'canceled',
103
- 'unpaid',
104
- 'paused',
105
- ];
106
- /** `fiat` (Stripe and any further provider) or `faircoin` (native, to the merchant's watch-only wallet). */
107
- exports.BILLING_RAIL_SETTLEMENTS = ['fiat', 'faircoin'];
108
- /** `automatic`: the provider charges each period. `payer_initiated`: each period is an explicit payment. */
109
- exports.BILLING_RAIL_RENEWALS = ['automatic', 'payer_initiated'];
110
94
  // Product tax codes are Peable Tax's vocabulary: `vocabulary/tax.ts` (`TAX_CODES`).
@@ -47,19 +47,15 @@ exports.ERROR_CODE_DESCRIPTIONS = {
47
47
  account_invalid: 'The `Peable-Account` header names no connected account of this platform.',
48
48
  account_missing: 'The merchant has no account object yet.',
49
49
  amount_not_representable: 'The amount does not fit the currency or the rail.',
50
- billing_not_enabled: 'Billing is not enabled for this merchant.',
51
- billing_provider_unavailable: 'The billing provider could not be reached; retry.',
52
50
  domain_taken: 'The domain is already registered by another merchant.',
53
51
  file_too_large: 'The uploaded file is larger than its purpose allows.',
54
52
  file_unavailable: 'The file exists but its contents cannot be served right now.',
55
53
  idempotency_error: 'The `Idempotency-Key` was used with a different request, or its first request is still running.',
56
54
  idempotency_key_invalid: 'The `Idempotency-Key` header is not a valid key.',
57
55
  insufficient_scope: 'The credential is valid but was not granted the Oxy scope this route requires (`payments:read`, `payments:write`, …); `message` names it.',
58
- invalid_billing_request: 'The billing request is not valid for this subscription or offer.',
59
56
  keyless_recipient: 'The recipient has no receive key, so no address can be derived for them.',
60
57
  link_not_found: 'The link does not exist or is no longer active.',
61
58
  live_payments_gated: 'Live payments are not enabled for this application yet.',
62
- local_test_request_required: 'This test helper only answers a local test request.',
63
59
  parameter_invalid: 'A parameter is invalid; `param` names it.',
64
60
  parameter_missing: 'A required parameter is missing; `param` names it.',
65
61
  parameter_unknown: 'The request carries a parameter this route does not accept; `param` names it.',
@@ -88,10 +84,7 @@ exports.ERROR_CODE_DESCRIPTIONS = {
88
84
  customer_location_invalid: "The tax provider could not use the customer's location.",
89
85
  dispute_already_submitted: 'Evidence for this dispute has already been submitted; it is one shot.',
90
86
  dispute_not_answerable: 'The dispute is in a status that no longer accepts evidence.',
91
- idempotency_conflict: 'The same operation key was used for a different billing request.',
92
- identity_conflict: 'The billing identity already belongs to another customer or subscription.',
93
87
  in_progress: 'The same operation is still running; retry with the same key.',
94
- invalid_provider_response: 'The provider answered with something Peable cannot trust; the operation was not applied.',
95
88
  invalid_registration: 'The tax registration is not valid.',
96
89
  invalid_registration_declaration: 'The tax registration declaration is not valid.',
97
90
  invalid_tax_code: 'The tax code does not exist.',
@@ -106,12 +99,9 @@ exports.ERROR_CODE_DESCRIPTIONS = {
106
99
  product_in_use: 'The product is referenced by a subscription or a link.',
107
100
  promotion_code_invalid: 'The promotion code does not exist, is inactive or does not apply.',
108
101
  promotion_code_taken: 'Another active promotion code already uses this `code`.',
109
- provider_unavailable: 'The payment provider could not be reached; retry.',
110
102
  rail_unavailable: 'The payment rail this request needs is not available.',
111
- reconciliation_required: 'The billing operation has an unknown outcome at the provider and is being reconciled.',
112
103
  registration_immutable: 'An approved or ended tax registration cannot be deleted or changed this way; end it instead.',
113
104
  resource_already_exists: 'An object with this identity already exists.',
114
- result_expired: 'The stored result of this operation has expired.',
115
105
  review_item_not_open: 'The review item is already resolved or dismissed.',
116
106
  rule_set_version_unavailable: 'The tax rule set version is not available.',
117
107
  subscription_line_invalid: 'A subscription line item is not valid for Checkout.',
@@ -119,9 +109,6 @@ exports.ERROR_CODE_DESCRIPTIONS = {
119
109
  tax_calculation_unavailable: 'Tax could not be calculated; a covered sale fails closed.',
120
110
  tax_provider_registration_mismatch: "The provider's registrations disagree with the ones Peable has approved.",
121
111
  tax_settings_not_active: 'Tax settings are not active for this merchant.',
122
- local_test_unavailable: 'The local test checkout is not available.',
123
- local_test_configuration_unavailable: 'The local test checkout has no provider configuration.',
124
- local_test_subscription_unavailable: 'The local test subscription cannot be read.',
125
112
  rail_mismatch: 'The operation does not apply to the rail this payment uses.',
126
113
  checkout_session_changed: 'The Checkout Session changed while this request ran (a price, a discount, its tax); read it again and retry.',
127
114
  checkout_session_locked: 'The Checkout Session is being confirmed and cannot change.',
@@ -61,7 +61,6 @@ exports.WEBHOOK_EVENT_OBJECTS = {
61
61
  'setup_intent.succeeded': 'setup_intent',
62
62
  'setup_intent.setup_failed': 'setup_intent',
63
63
  'setup_intent.canceled': 'setup_intent',
64
- 'billing.observation.updated': 'billing_observation',
65
64
  'connected_account.updated': 'connected_account',
66
65
  'product.created': 'product',
67
66
  'product.updated': 'product',
@@ -1,6 +1,5 @@
1
1
  // Contracts of this group: one module per resource, re-exported here, and
2
2
  // their routes concatenated into `catalogRoutes`.
3
- import { billingRoutes } from './billing.js';
4
3
  import { billingSettingsRoutes } from './billingSettings.js';
5
4
  import { couponRoutes } from './coupons.js';
6
5
  import { entitlementRoutes } from './entitlements.js';
@@ -9,7 +8,6 @@ import { priceRoutes } from './prices.js';
9
8
  import { productRoutes } from './products.js';
10
9
  import { promotionCodeRoutes } from './promotionCodes.js';
11
10
  import { testClockRoutes } from './testClocks.js';
12
- export * from './billing.js';
13
11
  export * from './billingSettings.js';
14
12
  export * from './coupons.js';
15
13
  export * from './entitlements.js';
@@ -22,8 +20,7 @@ export * from './testClocks.js';
22
20
  export { baseUnitAmountParam, queryFlag, queryIdList } from './shared.js';
23
21
  /**
24
22
  * The catalog (products, prices, coupons, promotion codes), entitlements, the
25
- * billing engine's platform objects (test clocks, billing settings, meters)
26
- * and the recurring billing transport (`/v1/billing/*`).
23
+ * billing engine's platform objects (test clocks, billing settings, meters).
27
24
  */
28
25
  export const catalogRoutes = [
29
26
  ...productRoutes,
@@ -34,5 +31,4 @@ export const catalogRoutes = [
34
31
  ...testClockRoutes,
35
32
  ...billingSettingsRoutes,
36
33
  ...meterRoutes,
37
- ...billingRoutes,
38
34
  ];
@@ -1,7 +1,6 @@
1
1
  import { z } from 'zod';
2
2
  import { CATALOG_LIMITS, PRICE_TAX_BEHAVIORS, RECURRING_INTERVALS } from '../../vocabulary/catalog.js';
3
3
  import { SETUP_INTENT_STATUSES } from '../../vocabulary/payments.js';
4
- import { billingFaircoinFxQuoteSchema } from '../catalog/billing.js';
5
4
  import { embedded } from '../../common/objects.js';
6
5
  import { listOf } from '../../common/envelopes.js';
7
6
  import { defineComponent, defineObject, expandable } from '../../common/objects.js';
@@ -180,9 +179,6 @@ export const checkoutSessionPublicSchema = defineComponent('CheckoutSessionPubli
180
179
  .string()
181
180
  .nullable()
182
181
  .describe("The card provider's PUBLIC key for this session's mode, so the payment fields can mount before the payment exists. `null` on FairCoin."),
183
- billing_quote: billingFaircoinFxQuoteSchema
184
- .optional()
185
- .describe('FairCoin billing invoices: the frozen USD price and FAIR settlement quote.'),
186
182
  })
187
183
  .strict());
188
184
  // ---- Merchant create/update ---------------------------------------------------
@@ -12,36 +12,6 @@ import { WEBHOOK_EVENT_OBJECTS, WEBHOOK_EVENT_TYPES, } from '../../vocabulary/ev
12
12
  * every matching webhook endpoint: a delivery's body and `GET /v1/events/:id`
13
13
  * are byte for byte the same object.
14
14
  */
15
- /**
16
- * The payload of `billing.observation.updated`: a wake-up, never paid or grant
17
- * authority. Re-read the owner-bound resource it names.
18
- */
19
- export const billingObservationSchema = defineObject('billing_observation', 'BillingObservation', z
20
- .object({
21
- object: z.literal('billing_observation'),
22
- livemode: livemode.describe('The mode of the billing cohort observed (ADR 0017).'),
23
- resource_kind: z.enum(['subscription', 'invoice']),
24
- resource_id: z.string().describe('The provider subscription or invoice observed.'),
25
- subscription_id: z
26
- .string()
27
- .optional()
28
- .describe('Owner-scoped wake-up hint only; re-read the subscription before resolving a payer.'),
29
- revision: z.number().int().describe('The observation revision; later revisions are newer.'),
30
- observed_at: unixSeconds,
31
- })
32
- .strict(), {
33
- examples: [
34
- {
35
- object: 'billing_observation',
36
- livemode: false,
37
- resource_kind: 'subscription',
38
- resource_id: 'sub_1Q2w3E4r5T6y7U8i',
39
- subscription_id: 'sub_1Q2w3E4r5T6y7U8i',
40
- revision: 3,
41
- observed_at: 1793750400,
42
- },
43
- ],
44
- });
45
15
  /**
46
16
  * What caused an event, when an API request did (Stripe's `event.request`).
47
17
  * Both `null` for an event caused by something else — the chain watcher, the
@@ -238,7 +208,6 @@ export const WEBHOOK_EVENT_DESCRIPTIONS = {
238
208
  'setup_intent.succeeded': 'A SetupIntent succeeded: its PaymentMethod is saved.',
239
209
  'setup_intent.setup_failed': 'A SetupIntent attempt failed.',
240
210
  'setup_intent.canceled': 'A SetupIntent was canceled.',
241
- 'billing.observation.updated': 'A recurring billing resource was observed to change. A wake-up only: re-read the resource.',
242
211
  'connected_account.updated': "A seller's connected account changed — its readiness, in practice.",
243
212
  'product.created': 'A Product was created.',
244
213
  'product.updated': 'A Product was updated; `previous_attributes` names what moved.',
@@ -87,20 +87,4 @@ export const BILLING_SETTINGS_LIMITS = Object.freeze({
87
87
  /** How a meter combines a period's events into the quantity billed. */
88
88
  export const METER_AGGREGATIONS = ['sum', 'count', 'last'];
89
89
  export const METER_STATUSES = ['active', 'inactive'];
90
- // ---- Recurring billing transport (`/v1/billing/*`) ---------------------------
91
- /** A provider subscription's status, as the recurring transport observes it. */
92
- export const BILLING_SUBSCRIPTION_STATUSES = [
93
- 'incomplete',
94
- 'incomplete_expired',
95
- 'trialing',
96
- 'active',
97
- 'past_due',
98
- 'canceled',
99
- 'unpaid',
100
- 'paused',
101
- ];
102
- /** `fiat` (Stripe and any further provider) or `faircoin` (native, to the merchant's watch-only wallet). */
103
- export const BILLING_RAIL_SETTLEMENTS = ['fiat', 'faircoin'];
104
- /** `automatic`: the provider charges each period. `payer_initiated`: each period is an explicit payment. */
105
- export const BILLING_RAIL_RENEWALS = ['automatic', 'payer_initiated'];
106
90
  // Product tax codes are Peable Tax's vocabulary: `vocabulary/tax.ts` (`TAX_CODES`).
@@ -42,19 +42,15 @@ export const ERROR_CODE_DESCRIPTIONS = {
42
42
  account_invalid: 'The `Peable-Account` header names no connected account of this platform.',
43
43
  account_missing: 'The merchant has no account object yet.',
44
44
  amount_not_representable: 'The amount does not fit the currency or the rail.',
45
- billing_not_enabled: 'Billing is not enabled for this merchant.',
46
- billing_provider_unavailable: 'The billing provider could not be reached; retry.',
47
45
  domain_taken: 'The domain is already registered by another merchant.',
48
46
  file_too_large: 'The uploaded file is larger than its purpose allows.',
49
47
  file_unavailable: 'The file exists but its contents cannot be served right now.',
50
48
  idempotency_error: 'The `Idempotency-Key` was used with a different request, or its first request is still running.',
51
49
  idempotency_key_invalid: 'The `Idempotency-Key` header is not a valid key.',
52
50
  insufficient_scope: 'The credential is valid but was not granted the Oxy scope this route requires (`payments:read`, `payments:write`, …); `message` names it.',
53
- invalid_billing_request: 'The billing request is not valid for this subscription or offer.',
54
51
  keyless_recipient: 'The recipient has no receive key, so no address can be derived for them.',
55
52
  link_not_found: 'The link does not exist or is no longer active.',
56
53
  live_payments_gated: 'Live payments are not enabled for this application yet.',
57
- local_test_request_required: 'This test helper only answers a local test request.',
58
54
  parameter_invalid: 'A parameter is invalid; `param` names it.',
59
55
  parameter_missing: 'A required parameter is missing; `param` names it.',
60
56
  parameter_unknown: 'The request carries a parameter this route does not accept; `param` names it.',
@@ -83,10 +79,7 @@ export const ERROR_CODE_DESCRIPTIONS = {
83
79
  customer_location_invalid: "The tax provider could not use the customer's location.",
84
80
  dispute_already_submitted: 'Evidence for this dispute has already been submitted; it is one shot.',
85
81
  dispute_not_answerable: 'The dispute is in a status that no longer accepts evidence.',
86
- idempotency_conflict: 'The same operation key was used for a different billing request.',
87
- identity_conflict: 'The billing identity already belongs to another customer or subscription.',
88
82
  in_progress: 'The same operation is still running; retry with the same key.',
89
- invalid_provider_response: 'The provider answered with something Peable cannot trust; the operation was not applied.',
90
83
  invalid_registration: 'The tax registration is not valid.',
91
84
  invalid_registration_declaration: 'The tax registration declaration is not valid.',
92
85
  invalid_tax_code: 'The tax code does not exist.',
@@ -101,12 +94,9 @@ export const ERROR_CODE_DESCRIPTIONS = {
101
94
  product_in_use: 'The product is referenced by a subscription or a link.',
102
95
  promotion_code_invalid: 'The promotion code does not exist, is inactive or does not apply.',
103
96
  promotion_code_taken: 'Another active promotion code already uses this `code`.',
104
- provider_unavailable: 'The payment provider could not be reached; retry.',
105
97
  rail_unavailable: 'The payment rail this request needs is not available.',
106
- reconciliation_required: 'The billing operation has an unknown outcome at the provider and is being reconciled.',
107
98
  registration_immutable: 'An approved or ended tax registration cannot be deleted or changed this way; end it instead.',
108
99
  resource_already_exists: 'An object with this identity already exists.',
109
- result_expired: 'The stored result of this operation has expired.',
110
100
  review_item_not_open: 'The review item is already resolved or dismissed.',
111
101
  rule_set_version_unavailable: 'The tax rule set version is not available.',
112
102
  subscription_line_invalid: 'A subscription line item is not valid for Checkout.',
@@ -114,9 +104,6 @@ export const ERROR_CODE_DESCRIPTIONS = {
114
104
  tax_calculation_unavailable: 'Tax could not be calculated; a covered sale fails closed.',
115
105
  tax_provider_registration_mismatch: "The provider's registrations disagree with the ones Peable has approved.",
116
106
  tax_settings_not_active: 'Tax settings are not active for this merchant.',
117
- local_test_unavailable: 'The local test checkout is not available.',
118
- local_test_configuration_unavailable: 'The local test checkout has no provider configuration.',
119
- local_test_subscription_unavailable: 'The local test subscription cannot be read.',
120
107
  rail_mismatch: 'The operation does not apply to the rail this payment uses.',
121
108
  checkout_session_changed: 'The Checkout Session changed while this request ran (a price, a discount, its tax); read it again and retry.',
122
109
  checkout_session_locked: 'The Checkout Session is being confirmed and cannot change.',
@@ -58,7 +58,6 @@ export const WEBHOOK_EVENT_OBJECTS = {
58
58
  'setup_intent.succeeded': 'setup_intent',
59
59
  'setup_intent.setup_failed': 'setup_intent',
60
60
  'setup_intent.canceled': 'setup_intent',
61
- 'billing.observation.updated': 'billing_observation',
62
61
  'connected_account.updated': 'connected_account',
63
62
  'product.created': 'product',
64
63
  'product.updated': 'product',