@whooshbang/contracts 2.0.0-rc.6 → 2.0.0-rc.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +8 -0
- package/contract-manifest.json +40 -42
- package/dist/generated/artifact-index.d.ts +34 -34
- package/dist/generated/artifact-index.js +39 -41
- package/dist/generated/artifact-index.js.map +1 -1
- package/dist/generated/validators-standalone.d.ts +391 -404
- package/dist/generated/validators-standalone.js +8115 -6262
- package/dist/generated/validators-standalone.js.map +1 -1
- package/dist/generated/validators.d.ts +9 -10
- package/dist/generated/validators.js +9 -10
- package/dist/generated/validators.js.map +1 -1
- package/dist/generated/whooshbang-v1.d.ts +166 -59
- package/dist/index.d.ts +2 -2
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/fixtures/core-v1/fixture-index.json +54 -71
- package/fixtures/core-v1/requests/update-billing-receipt-email.json +3 -0
- package/fixtures/core-v1/scenarios/api-credential-invalid-indistinguishable.json +1 -1
- package/fixtures/core-v1/scenarios/api-credential-one-time-reveal.json +1 -1
- package/fixtures/core-v1/scenarios/api-credential-revocation-replay.json +1 -1
- package/fixtures/core-v1/scenarios/api-credential-rotation-overlap.json +1 -1
- package/fixtures/core-v1/scenarios/cancellation-too-late.json +1 -1
- package/fixtures/core-v1/scenarios/cross-organization-project.json +1 -1
- package/fixtures/core-v1/scenarios/cross-project-resource.json +1 -1
- package/fixtures/core-v1/scenarios/environment-mismatch.json +1 -1
- package/fixtures/core-v1/scenarios/idempotency-conflict.json +1 -1
- package/fixtures/core-v1/scenarios/idempotency-equivalent-replay.json +1 -1
- package/fixtures/core-v1/scenarios/malformed-bearer.json +1 -1
- package/fixtures/core-v1/scenarios/metadata-overrun.json +1 -1
- package/fixtures/core-v1/scenarios/missing-scope.json +1 -1
- package/fixtures/core-v1/scenarios/project-create-equivalent-replay.json +1 -1
- package/fixtures/core-v1/scenarios/project-slug-conflict.json +1 -1
- package/fixtures/core-v1/scenarios/provider-outcome-unknown.json +1 -1
- package/fixtures/core-v1/scenarios/subscription-activation-replay.json +1 -1
- package/fixtures/core-v1/scenarios/subscription-authorization-capability-opacity.json +1 -1
- package/fixtures/core-v1/scenarios/subscription-cross-connection-callback-rejected.json +1 -1
- package/fixtures/core-v1/scenarios/subscription-expired-replay.json +1 -1
- package/fixtures/core-v1/scenarios/subscription-selected-connection-replay.json +1 -1
- package/fixtures/core-v1/success/auto-top-up-settings.json +2 -2
- package/fixtures/core-v1/success/billing-account.json +4 -2
- package/fixtures/core-v1/success/billing-entitlements.json +3 -4
- package/fixtures/core-v1/success/billing-invoices.json +33 -0
- package/fixtures/core-v1/success/card-setup.json +7 -0
- package/fixtures/core-v1/success/credit-purchase.json +15 -0
- package/fixtures/core-v1/success/reconcile-card-setup.json +12 -0
- package/fixtures/core-v1/success/subscription-change.json +3 -1
- package/fixtures/interaction-machine-v1/scenarios/ack-conflict.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/ack-cross-machine.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/ack-out-of-order.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/ack-replay.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/ambiguous-free-text.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/callback-token-opacity.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/credential-registration-conflict.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/credential-registration-replay.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/credential-revocation-replay.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/credential-rotation.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/first-credential-activates.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/interaction-duplicate.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/interaction-expired.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/interaction-mismatch.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/interaction-retired.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/interaction-stale.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-admin-denied.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-bound-message-create.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-cancel-denied.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-crash-before-ack.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-notifier-mismatch.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-other-message-read.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-owned-message-read.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/machine-subscriber-mismatch.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/poll-uncommitted-cursor-rejected.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/project-credential-machine-endpoint-denied.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/quarantine-integrity-rejected.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/quarantine-signature-rejected.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/quarantine-valid.json +1 -1
- package/fixtures/interaction-machine-v1/scenarios/revoked-machine-credential.json +1 -1
- package/fixtures/recipient-experience-v1/scenarios/membership-broadcast-snapshot.json +1 -1
- package/fixtures/recipient-experience-v1/scenarios/preferred-binding-resolution.json +1 -1
- package/fixtures/recipient-experience-v1/scenarios/recipient-session-security.json +1 -1
- package/fixtures/recipient-experience-v1/scenarios/subscriber-initial-groups-transaction.json +1 -1
- package/openapi/generated/whooshbang-v1.bundle.json +548 -470
- package/openapi/whooshbang-v1.yaml +193 -331
- package/package.json +1 -1
- package/schemas/core-scenario.schema.json +1 -1
- package/schemas/events/agent-binding-degraded-v1.schema.json +1 -1
- package/schemas/events/interaction-expired-v1.schema.json +1 -1
- package/schemas/events/interaction-received-v1.schema.json +1 -1
- package/schemas/events/message-delivered-v1.schema.json +1 -1
- package/schemas/events/message-expired-v1.schema.json +1 -1
- package/schemas/events/message-failed-v1.schema.json +1 -1
- package/schemas/events/message-provider-accepted-v1.schema.json +1 -1
- package/schemas/events/subscription-activated-v1.schema.json +1 -1
- package/schemas/events/subscription-revoked-v1.schema.json +1 -1
- package/schemas/events/whooshbang-event-v1.schema.json +1 -1
- package/schemas/fixture-index.schema.json +1 -1
- package/schemas/interaction-machine-scenario.schema.json +1 -1
- package/schemas/interaction-v1.schema.json +1 -1
- package/schemas/machine-v1.schema.json +1 -1
- package/schemas/provider-capabilities-v1.schema.json +1 -1
- package/schemas/webhooks/webhook-delivery-case-v1.schema.json +1 -1
- package/schemas/webhooks/webhook-signing-vector-v1.schema.json +1 -1
- package/schemas/whooshbang-v1.schema.json +505 -243
- package/fixtures/core-v1/success/auto-top-up-setup.json +0 -5
- package/fixtures/core-v1/success/billing-portal-session.json +0 -3
- package/fixtures/core-v1/success/reconcile-auto-top-up-setup.json +0 -17
- package/fixtures/core-v1/success/reconcile-subscription-checkout.json +0 -35
- package/fixtures/core-v1/success/reconcile-wallet-checkout.json +0 -36
- package/fixtures/core-v1/success/subscription-checkout.json +0 -5
- package/fixtures/core-v1/success/wallet-checkout.json +0 -5
- /package/fixtures/core-v1/requests/{create-wallet-checkout.json → create-credit-purchase.json} +0 -0
- /package/fixtures/core-v1/requests/{create-subscription-checkout.json → create-subscription-change.json} +0 -0
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"openapi": "3.1.1",
|
|
3
3
|
"info": {
|
|
4
4
|
"title": "WhooshBang API",
|
|
5
|
-
"version": "2.0.0-rc.
|
|
5
|
+
"version": "2.0.0-rc.7",
|
|
6
6
|
"description": "The V1 contract for human organization/project administration, project-scoped\nsubscription links, and asynchronous text messages. A Clerk session selects\none organization for administration. A project credential selects one organization,\nproject, and `test` or `live` environment for product operations; request\nbodies cannot override either authenticated scope.\n\nA person's OAuth grant selects one organization and carries scopes, but no\nproject. It names the project and environment it acts in through the URL\npath, on the environment-scoped form of each operation; the service checks\nthat path against the granting person's membership on every call. The flat\nforms remain credential-only and are unchanged.\n\nResource identifiers are opaque and are not authorization. Reads outside the\ncredential scope return the same `404` shape as absent resources. Provider\ncredentials, raw Telegram identity, and protected provider responses are\nnever part of this API.\n",
|
|
7
7
|
"termsOfService": "https://flowxo.com/terms",
|
|
8
8
|
"contact": {
|
|
@@ -159,93 +159,11 @@
|
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
},
|
|
162
|
-
"/v1/billing/portal-sessions": {
|
|
163
|
-
"post": {
|
|
164
|
-
"operationId": "createBillingPortalSession",
|
|
165
|
-
"summary": "Open Stripe payment and subscription management",
|
|
166
|
-
"description": "Requires a current organization administrator and explicit billing write consent.\nUses only the organization's persisted Stripe customer or approved saved purchase.\nReturn destinations are server-owned. Opening the page does not itself charge a card.\n",
|
|
167
|
-
"tags": ["Organization"],
|
|
168
|
-
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
169
|
-
"x-required-scopes": ["billing:write"],
|
|
170
|
-
"x-organization-membership": "required",
|
|
171
|
-
"parameters": [{ "$ref": "#/components/parameters/IdempotencyKey" }],
|
|
172
|
-
"responses": {
|
|
173
|
-
"201": {
|
|
174
|
-
"description": "Open Stripe payment and subscription management.",
|
|
175
|
-
"headers": {
|
|
176
|
-
"WhooshBang-Diagnostic-Id": {
|
|
177
|
-
"$ref": "#/components/headers/DiagnosticId"
|
|
178
|
-
}
|
|
179
|
-
},
|
|
180
|
-
"content": {
|
|
181
|
-
"application/json": {
|
|
182
|
-
"schema": {
|
|
183
|
-
"$ref": "#/components/schemas/BillingPortalSession"
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
},
|
|
188
|
-
"400": { "$ref": "#/components/responses/BadRequest" },
|
|
189
|
-
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
190
|
-
"403": { "$ref": "#/components/responses/Forbidden" },
|
|
191
|
-
"404": { "$ref": "#/components/responses/NotFound" },
|
|
192
|
-
"409": { "$ref": "#/components/responses/Conflict" },
|
|
193
|
-
"429": { "$ref": "#/components/responses/RateLimited" },
|
|
194
|
-
"502": { "$ref": "#/components/responses/ProviderOutcomeUnknown" }
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
},
|
|
198
|
-
"/v1/billing/subscription-checkouts/{checkoutId}/resume": {
|
|
199
|
-
"post": {
|
|
200
|
-
"operationId": "resumeSubscriptionCheckout",
|
|
201
|
-
"summary": "Resume the saved subscription purchase",
|
|
202
|
-
"description": "Requires a current organization administrator and explicit billing write consent.\nUses only the organization's persisted Stripe customer or approved saved purchase.\nReturn destinations are server-owned. Opening the page does not itself charge a card.\n",
|
|
203
|
-
"tags": ["Organization"],
|
|
204
|
-
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
205
|
-
"x-required-scopes": ["billing:write"],
|
|
206
|
-
"x-organization-membership": "required",
|
|
207
|
-
"parameters": [
|
|
208
|
-
{
|
|
209
|
-
"name": "checkoutId",
|
|
210
|
-
"in": "path",
|
|
211
|
-
"required": true,
|
|
212
|
-
"schema": {
|
|
213
|
-
"type": "string",
|
|
214
|
-
"pattern": "^subscription_checkout_[a-f0-9]{32}$"
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
],
|
|
218
|
-
"responses": {
|
|
219
|
-
"200": {
|
|
220
|
-
"description": "Resume the saved subscription purchase.",
|
|
221
|
-
"headers": {
|
|
222
|
-
"WhooshBang-Diagnostic-Id": {
|
|
223
|
-
"$ref": "#/components/headers/DiagnosticId"
|
|
224
|
-
}
|
|
225
|
-
},
|
|
226
|
-
"content": {
|
|
227
|
-
"application/json": {
|
|
228
|
-
"schema": {
|
|
229
|
-
"$ref": "#/components/schemas/SubscriptionCheckout"
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
}
|
|
233
|
-
},
|
|
234
|
-
"400": { "$ref": "#/components/responses/BadRequest" },
|
|
235
|
-
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
236
|
-
"403": { "$ref": "#/components/responses/Forbidden" },
|
|
237
|
-
"404": { "$ref": "#/components/responses/NotFound" },
|
|
238
|
-
"409": { "$ref": "#/components/responses/Conflict" },
|
|
239
|
-
"429": { "$ref": "#/components/responses/RateLimited" },
|
|
240
|
-
"502": { "$ref": "#/components/responses/ProviderOutcomeUnknown" }
|
|
241
|
-
}
|
|
242
|
-
}
|
|
243
|
-
},
|
|
244
162
|
"/v1/billing/auto-top-up": {
|
|
245
163
|
"get": {
|
|
246
164
|
"operationId": "getAutoTopUpSettings",
|
|
247
165
|
"summary": "Read automatic top-up settings",
|
|
248
|
-
"description": "Requires an organization administrator and human billing consent. Automatic top-up is off by default.\nThe selected gross monthly cap counts pending and paid purchases initiated in each UTC calendar month.\nRefunds do not restore that cap. Disable stops future purchases; an authorized processing purchase may finish.\
|
|
166
|
+
"description": "Requires an organization administrator and human billing consent. Automatic top-up is off by default.\nThe selected gross monthly cap counts pending and paid purchases initiated in each UTC calendar month.\nRefunds do not restore that cap. Disable stops future purchases; an authorized processing purchase may finish.\nPurchases use the organization's one default card. Only verified payments fund credit.\n",
|
|
249
167
|
"tags": ["Organization"],
|
|
250
168
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
251
169
|
"x-required-scopes": ["billing:read"],
|
|
@@ -276,7 +194,7 @@
|
|
|
276
194
|
"put": {
|
|
277
195
|
"operationId": "updateAutoTopUpSettings",
|
|
278
196
|
"summary": "Confirm automatic top-up settings",
|
|
279
|
-
"description": "Requires an organization administrator and human billing consent. Automatic top-up is off by default.\nThe selected gross monthly cap counts pending and paid purchases initiated in each UTC calendar month.\nRefunds do not restore that cap. Disable stops future purchases; an authorized processing purchase may finish.\
|
|
197
|
+
"description": "Requires an organization administrator and human billing consent. Automatic top-up is off by default.\nThe selected gross monthly cap counts pending and paid purchases initiated in each UTC calendar month.\nRefunds do not restore that cap. Disable stops future purchases; an authorized processing purchase may finish.\nPurchases use the organization's one default card. Only verified payments fund credit.\n",
|
|
280
198
|
"tags": ["Organization"],
|
|
281
199
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
282
200
|
"x-required-scopes": ["billing:write"],
|
|
@@ -315,19 +233,18 @@
|
|
|
315
233
|
}
|
|
316
234
|
}
|
|
317
235
|
},
|
|
318
|
-
"/v1/billing/
|
|
319
|
-
"
|
|
320
|
-
"operationId": "
|
|
321
|
-
"summary": "
|
|
322
|
-
"description": "Requires
|
|
236
|
+
"/v1/billing/entitlements": {
|
|
237
|
+
"get": {
|
|
238
|
+
"operationId": "getBillingEntitlements",
|
|
239
|
+
"summary": "Read paid account entitlements",
|
|
240
|
+
"description": "Requires current organization membership. Financial purchases and preference writes require an administrator.\nPrices and paid entitlements come from server-approved offers and verified captured payments.\nAttribution expiry restores the platform mark while retaining sender identity, consent,\nunsubscribe and answer controls. payment_issue reports a recurring charge the card did not pay.\n",
|
|
323
241
|
"tags": ["Organization"],
|
|
324
242
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
325
|
-
"x-required-scopes": ["billing:
|
|
243
|
+
"x-required-scopes": ["billing:read"],
|
|
326
244
|
"x-organization-membership": "required",
|
|
327
|
-
"parameters": [{ "$ref": "#/components/parameters/IdempotencyKey" }],
|
|
328
245
|
"responses": {
|
|
329
|
-
"
|
|
330
|
-
"description": "
|
|
246
|
+
"200": {
|
|
247
|
+
"description": "Read paid account entitlements.",
|
|
331
248
|
"headers": {
|
|
332
249
|
"WhooshBang-Diagnostic-Id": {
|
|
333
250
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -335,7 +252,7 @@
|
|
|
335
252
|
},
|
|
336
253
|
"content": {
|
|
337
254
|
"application/json": {
|
|
338
|
-
"schema": { "$ref": "#/components/schemas/
|
|
255
|
+
"schema": { "$ref": "#/components/schemas/BillingEntitlements" }
|
|
339
256
|
}
|
|
340
257
|
}
|
|
341
258
|
},
|
|
@@ -349,29 +266,27 @@
|
|
|
349
266
|
}
|
|
350
267
|
}
|
|
351
268
|
},
|
|
352
|
-
"/v1/billing/
|
|
269
|
+
"/v1/billing/subscription-changes": {
|
|
353
270
|
"post": {
|
|
354
|
-
"operationId": "
|
|
355
|
-
"summary": "
|
|
356
|
-
"description": "Requires an
|
|
271
|
+
"operationId": "createSubscriptionChange",
|
|
272
|
+
"summary": "Quote an approved recurring change",
|
|
273
|
+
"description": "Requires an administrator in the current organization. A quote does not charge. Without a current plan or add-on the change starts one. Confirmation matches the saved exact cash amount and charges the default card. Uncertain outcomes recover the same owned change.",
|
|
357
274
|
"tags": ["Organization"],
|
|
358
275
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
359
276
|
"x-required-scopes": ["billing:write"],
|
|
360
277
|
"x-organization-membership": "required",
|
|
361
|
-
"parameters": [
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
"
|
|
366
|
-
|
|
367
|
-
"type": "string",
|
|
368
|
-
"pattern": "^auto_top_up_setup_[a-f0-9]{32}$"
|
|
278
|
+
"parameters": [{ "$ref": "#/components/parameters/IdempotencyKey" }],
|
|
279
|
+
"requestBody": {
|
|
280
|
+
"required": true,
|
|
281
|
+
"content": {
|
|
282
|
+
"application/json": {
|
|
283
|
+
"schema": { "$ref": "#/components/schemas/SubscriptionSelection" }
|
|
369
284
|
}
|
|
370
285
|
}
|
|
371
|
-
|
|
286
|
+
},
|
|
372
287
|
"responses": {
|
|
373
|
-
"
|
|
374
|
-
"description": "
|
|
288
|
+
"201": {
|
|
289
|
+
"description": "Quote an approved recurring change.",
|
|
375
290
|
"headers": {
|
|
376
291
|
"WhooshBang-Diagnostic-Id": {
|
|
377
292
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -379,9 +294,7 @@
|
|
|
379
294
|
},
|
|
380
295
|
"content": {
|
|
381
296
|
"application/json": {
|
|
382
|
-
"schema": {
|
|
383
|
-
"$ref": "#/components/schemas/ReconcileAutoTopUpSetupResult"
|
|
384
|
-
}
|
|
297
|
+
"schema": { "$ref": "#/components/schemas/SubscriptionChange" }
|
|
385
298
|
}
|
|
386
299
|
}
|
|
387
300
|
},
|
|
@@ -395,62 +308,29 @@
|
|
|
395
308
|
}
|
|
396
309
|
}
|
|
397
310
|
},
|
|
398
|
-
"/v1/billing/
|
|
399
|
-
"
|
|
400
|
-
"operationId": "
|
|
401
|
-
"summary": "
|
|
402
|
-
"description": "Requires an
|
|
311
|
+
"/v1/billing/subscription-changes/{changeId}": {
|
|
312
|
+
"get": {
|
|
313
|
+
"operationId": "getSubscriptionChange",
|
|
314
|
+
"summary": "Recover an owned recurring change",
|
|
315
|
+
"description": "Requires an administrator in the current organization. A quote does not charge. Without a current plan or add-on the change starts one. Confirmation matches the saved exact cash amount and charges the default card. Uncertain outcomes recover the same owned change.",
|
|
403
316
|
"tags": ["Organization"],
|
|
404
317
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
405
|
-
"x-required-scopes": ["billing:
|
|
318
|
+
"x-required-scopes": ["billing:read"],
|
|
406
319
|
"x-organization-membership": "required",
|
|
407
320
|
"parameters": [
|
|
408
321
|
{
|
|
409
|
-
"name": "
|
|
322
|
+
"name": "changeId",
|
|
410
323
|
"in": "path",
|
|
411
324
|
"required": true,
|
|
412
325
|
"schema": {
|
|
413
326
|
"type": "string",
|
|
414
|
-
"pattern": "^
|
|
327
|
+
"pattern": "^subscription_change_[a-f0-9]{32}$"
|
|
415
328
|
}
|
|
416
329
|
}
|
|
417
330
|
],
|
|
418
331
|
"responses": {
|
|
419
332
|
"200": {
|
|
420
|
-
"description": "
|
|
421
|
-
"headers": {
|
|
422
|
-
"WhooshBang-Diagnostic-Id": {
|
|
423
|
-
"$ref": "#/components/headers/DiagnosticId"
|
|
424
|
-
}
|
|
425
|
-
},
|
|
426
|
-
"content": {
|
|
427
|
-
"application/json": {
|
|
428
|
-
"schema": { "$ref": "#/components/schemas/AutoTopUpSetup" }
|
|
429
|
-
}
|
|
430
|
-
}
|
|
431
|
-
},
|
|
432
|
-
"400": { "$ref": "#/components/responses/BadRequest" },
|
|
433
|
-
"401": { "$ref": "#/components/responses/Unauthorized" },
|
|
434
|
-
"403": { "$ref": "#/components/responses/Forbidden" },
|
|
435
|
-
"404": { "$ref": "#/components/responses/NotFound" },
|
|
436
|
-
"409": { "$ref": "#/components/responses/Conflict" },
|
|
437
|
-
"429": { "$ref": "#/components/responses/RateLimited" },
|
|
438
|
-
"502": { "$ref": "#/components/responses/ProviderOutcomeUnknown" }
|
|
439
|
-
}
|
|
440
|
-
}
|
|
441
|
-
},
|
|
442
|
-
"/v1/billing/entitlements": {
|
|
443
|
-
"get": {
|
|
444
|
-
"operationId": "getBillingEntitlements",
|
|
445
|
-
"summary": "Read paid account entitlements",
|
|
446
|
-
"description": "Requires current organization membership. Financial purchases and preference writes require an administrator.\nPrices and paid entitlements come from server-approved offers and verified captured Stripe payments.\nSubscription Checkout does not itself grant paid access. Attribution expiry restores the platform mark\nwhile retaining sender identity, consent, unsubscribe and answer controls.\n",
|
|
447
|
-
"tags": ["Organization"],
|
|
448
|
-
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
449
|
-
"x-required-scopes": ["billing:read"],
|
|
450
|
-
"x-organization-membership": "required",
|
|
451
|
-
"responses": {
|
|
452
|
-
"200": {
|
|
453
|
-
"description": "Read paid account entitlements.",
|
|
333
|
+
"description": "Recover an owned recurring change.",
|
|
454
334
|
"headers": {
|
|
455
335
|
"WhooshBang-Diagnostic-Id": {
|
|
456
336
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -458,7 +338,7 @@
|
|
|
458
338
|
},
|
|
459
339
|
"content": {
|
|
460
340
|
"application/json": {
|
|
461
|
-
"schema": { "$ref": "#/components/schemas/
|
|
341
|
+
"schema": { "$ref": "#/components/schemas/SubscriptionChange" }
|
|
462
342
|
}
|
|
463
343
|
}
|
|
464
344
|
},
|
|
@@ -472,29 +352,39 @@
|
|
|
472
352
|
}
|
|
473
353
|
}
|
|
474
354
|
},
|
|
475
|
-
"/v1/billing/subscription-changes": {
|
|
355
|
+
"/v1/billing/subscription-changes/{changeId}/confirm": {
|
|
476
356
|
"post": {
|
|
477
|
-
"operationId": "
|
|
478
|
-
"summary": "
|
|
479
|
-
"description": "Requires an administrator in the current organization. A quote does not charge. Confirmation matches the saved exact cash amount. Uncertain outcomes recover the same owned change.",
|
|
357
|
+
"operationId": "confirmSubscriptionChange",
|
|
358
|
+
"summary": "Confirm the quoted card charge or scheduled reduction",
|
|
359
|
+
"description": "Requires an administrator in the current organization. A quote does not charge. Without a current plan or add-on the change starts one. Confirmation matches the saved exact cash amount and charges the default card. Uncertain outcomes recover the same owned change.",
|
|
480
360
|
"tags": ["Organization"],
|
|
481
361
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
482
362
|
"x-required-scopes": ["billing:write"],
|
|
483
363
|
"x-organization-membership": "required",
|
|
484
|
-
"parameters": [
|
|
364
|
+
"parameters": [
|
|
365
|
+
{
|
|
366
|
+
"name": "changeId",
|
|
367
|
+
"in": "path",
|
|
368
|
+
"required": true,
|
|
369
|
+
"schema": {
|
|
370
|
+
"type": "string",
|
|
371
|
+
"pattern": "^subscription_change_[a-f0-9]{32}$"
|
|
372
|
+
}
|
|
373
|
+
}
|
|
374
|
+
],
|
|
485
375
|
"requestBody": {
|
|
486
376
|
"required": true,
|
|
487
377
|
"content": {
|
|
488
378
|
"application/json": {
|
|
489
379
|
"schema": {
|
|
490
|
-
"$ref": "#/components/schemas/
|
|
380
|
+
"$ref": "#/components/schemas/ConfirmSubscriptionChangeRequest"
|
|
491
381
|
}
|
|
492
382
|
}
|
|
493
383
|
}
|
|
494
384
|
},
|
|
495
385
|
"responses": {
|
|
496
|
-
"
|
|
497
|
-
"description": "
|
|
386
|
+
"200": {
|
|
387
|
+
"description": "Confirm the quoted card charge or scheduled reduction.",
|
|
498
388
|
"headers": {
|
|
499
389
|
"WhooshBang-Diagnostic-Id": {
|
|
500
390
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -516,14 +406,14 @@
|
|
|
516
406
|
}
|
|
517
407
|
}
|
|
518
408
|
},
|
|
519
|
-
"/v1/billing/subscription-changes/{changeId}": {
|
|
520
|
-
"
|
|
521
|
-
"operationId": "
|
|
522
|
-
"summary": "
|
|
523
|
-
"description": "Requires an administrator in the current organization.
|
|
409
|
+
"/v1/billing/subscription-changes/{changeId}/cancel": {
|
|
410
|
+
"post": {
|
|
411
|
+
"operationId": "cancelSubscriptionChange",
|
|
412
|
+
"summary": "Discard a quote or undo a scheduled change",
|
|
413
|
+
"description": "Requires an administrator in the current organization. Discards a reserved quote before anything is charged, or undoes a change scheduled for the end of the paid month before it takes effect; the plan and add-ons then stay exactly as they are. A change already being charged cannot be discarded. Repeating the request reports the same expired change.",
|
|
524
414
|
"tags": ["Organization"],
|
|
525
415
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
526
|
-
"x-required-scopes": ["billing:
|
|
416
|
+
"x-required-scopes": ["billing:write"],
|
|
527
417
|
"x-organization-membership": "required",
|
|
528
418
|
"parameters": [
|
|
529
419
|
{
|
|
@@ -538,7 +428,7 @@
|
|
|
538
428
|
],
|
|
539
429
|
"responses": {
|
|
540
430
|
"200": {
|
|
541
|
-
"description": "
|
|
431
|
+
"description": "The discarded quote or undone scheduled change, now expired.",
|
|
542
432
|
"headers": {
|
|
543
433
|
"WhooshBang-Diagnostic-Id": {
|
|
544
434
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -560,39 +450,26 @@
|
|
|
560
450
|
}
|
|
561
451
|
}
|
|
562
452
|
},
|
|
563
|
-
"/v1/
|
|
564
|
-
"
|
|
565
|
-
"operationId": "
|
|
566
|
-
"summary": "
|
|
567
|
-
"description": "Requires an administrator
|
|
453
|
+
"/v1/projects/{projectId}/attribution": {
|
|
454
|
+
"get": {
|
|
455
|
+
"operationId": "getProjectAttribution",
|
|
456
|
+
"summary": "Read project attribution preference and entitlement",
|
|
457
|
+
"description": "Requires current organization membership. Financial purchases and preference writes require an administrator.\nPrices and paid entitlements come from server-approved offers and verified captured payments.\nAttribution expiry restores the platform mark while retaining sender identity, consent,\nunsubscribe and answer controls. payment_issue reports a recurring charge the card did not pay.\n",
|
|
568
458
|
"tags": ["Organization"],
|
|
569
459
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
570
|
-
"x-required-scopes": ["
|
|
460
|
+
"x-required-scopes": ["projects:read"],
|
|
571
461
|
"x-organization-membership": "required",
|
|
572
462
|
"parameters": [
|
|
573
463
|
{
|
|
574
|
-
"name": "
|
|
464
|
+
"name": "projectId",
|
|
575
465
|
"in": "path",
|
|
576
466
|
"required": true,
|
|
577
|
-
"schema": {
|
|
578
|
-
"type": "string",
|
|
579
|
-
"pattern": "^subscription_change_[a-f0-9]{32}$"
|
|
580
|
-
}
|
|
467
|
+
"schema": { "type": "string" }
|
|
581
468
|
}
|
|
582
469
|
],
|
|
583
|
-
"requestBody": {
|
|
584
|
-
"required": true,
|
|
585
|
-
"content": {
|
|
586
|
-
"application/json": {
|
|
587
|
-
"schema": {
|
|
588
|
-
"$ref": "#/components/schemas/ConfirmSubscriptionChangeRequest"
|
|
589
|
-
}
|
|
590
|
-
}
|
|
591
|
-
}
|
|
592
|
-
},
|
|
593
470
|
"responses": {
|
|
594
471
|
"200": {
|
|
595
|
-
"description": "
|
|
472
|
+
"description": "Read project attribution preference and entitlement.",
|
|
596
473
|
"headers": {
|
|
597
474
|
"WhooshBang-Diagnostic-Id": {
|
|
598
475
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -600,7 +477,7 @@
|
|
|
600
477
|
},
|
|
601
478
|
"content": {
|
|
602
479
|
"application/json": {
|
|
603
|
-
"schema": { "$ref": "#/components/schemas/
|
|
480
|
+
"schema": { "$ref": "#/components/schemas/ProjectAttribution" }
|
|
604
481
|
}
|
|
605
482
|
}
|
|
606
483
|
},
|
|
@@ -612,31 +489,36 @@
|
|
|
612
489
|
"429": { "$ref": "#/components/responses/RateLimited" },
|
|
613
490
|
"502": { "$ref": "#/components/responses/ProviderOutcomeUnknown" }
|
|
614
491
|
}
|
|
615
|
-
}
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
"
|
|
620
|
-
"summary": "Discard an undispatched recurring quote",
|
|
621
|
-
"description": "Requires an administrator in the current organization. A quote does not charge. Confirmation matches the saved exact cash amount. Uncertain outcomes recover the same owned change.",
|
|
492
|
+
},
|
|
493
|
+
"put": {
|
|
494
|
+
"operationId": "updateProjectAttribution",
|
|
495
|
+
"summary": "Update project attribution preference",
|
|
496
|
+
"description": "Requires current organization membership. Financial purchases and preference writes require an administrator.\nPrices and paid entitlements come from server-approved offers and verified captured payments.\nAttribution expiry restores the platform mark while retaining sender identity, consent,\nunsubscribe and answer controls. payment_issue reports a recurring charge the card did not pay.\n",
|
|
622
497
|
"tags": ["Organization"],
|
|
623
498
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
624
|
-
"x-required-scopes": ["
|
|
499
|
+
"x-required-scopes": ["projects:write"],
|
|
625
500
|
"x-organization-membership": "required",
|
|
626
501
|
"parameters": [
|
|
627
502
|
{
|
|
628
|
-
"name": "
|
|
503
|
+
"name": "projectId",
|
|
629
504
|
"in": "path",
|
|
630
505
|
"required": true,
|
|
631
|
-
"schema": {
|
|
632
|
-
"type": "string",
|
|
633
|
-
"pattern": "^subscription_change_[a-f0-9]{32}$"
|
|
634
|
-
}
|
|
506
|
+
"schema": { "type": "string" }
|
|
635
507
|
}
|
|
636
508
|
],
|
|
509
|
+
"requestBody": {
|
|
510
|
+
"required": true,
|
|
511
|
+
"content": {
|
|
512
|
+
"application/json": {
|
|
513
|
+
"schema": {
|
|
514
|
+
"$ref": "#/components/schemas/UpdateProjectAttributionRequest"
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
}
|
|
518
|
+
},
|
|
637
519
|
"responses": {
|
|
638
520
|
"200": {
|
|
639
|
-
"description": "
|
|
521
|
+
"description": "Update project attribution preference.",
|
|
640
522
|
"headers": {
|
|
641
523
|
"WhooshBang-Diagnostic-Id": {
|
|
642
524
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -644,7 +526,7 @@
|
|
|
644
526
|
},
|
|
645
527
|
"content": {
|
|
646
528
|
"application/json": {
|
|
647
|
-
"schema": { "$ref": "#/components/schemas/
|
|
529
|
+
"schema": { "$ref": "#/components/schemas/ProjectAttribution" }
|
|
648
530
|
}
|
|
649
531
|
}
|
|
650
532
|
},
|
|
@@ -658,29 +540,19 @@
|
|
|
658
540
|
}
|
|
659
541
|
}
|
|
660
542
|
},
|
|
661
|
-
"/v1/billing/
|
|
543
|
+
"/v1/billing/card-setups": {
|
|
662
544
|
"post": {
|
|
663
|
-
"operationId": "
|
|
664
|
-
"summary": "
|
|
665
|
-
"description": "Requires current organization
|
|
545
|
+
"operationId": "createCardSetup",
|
|
546
|
+
"summary": "Open a card form session",
|
|
547
|
+
"description": "Requires a current organization administrator. A person enters the card in the\nembeddable payment form; card numbers never pass through WhooshBang. A complete\nsetup makes the card the organization's one default card for credit, automatic\ntop-up, plans and add-ons. Opening a setup does not charge anything.\n",
|
|
666
548
|
"tags": ["Organization"],
|
|
667
549
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
668
550
|
"x-required-scopes": ["billing:write"],
|
|
669
551
|
"x-organization-membership": "required",
|
|
670
552
|
"parameters": [{ "$ref": "#/components/parameters/IdempotencyKey" }],
|
|
671
|
-
"requestBody": {
|
|
672
|
-
"required": true,
|
|
673
|
-
"content": {
|
|
674
|
-
"application/json": {
|
|
675
|
-
"schema": {
|
|
676
|
-
"$ref": "#/components/schemas/CreateSubscriptionCheckoutRequest"
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
}
|
|
680
|
-
},
|
|
681
553
|
"responses": {
|
|
682
554
|
"201": {
|
|
683
|
-
"description": "
|
|
555
|
+
"description": "Open a card form session.",
|
|
684
556
|
"headers": {
|
|
685
557
|
"WhooshBang-Diagnostic-Id": {
|
|
686
558
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -688,9 +560,7 @@
|
|
|
688
560
|
},
|
|
689
561
|
"content": {
|
|
690
562
|
"application/json": {
|
|
691
|
-
"schema": {
|
|
692
|
-
"$ref": "#/components/schemas/SubscriptionCheckout"
|
|
693
|
-
}
|
|
563
|
+
"schema": { "$ref": "#/components/schemas/CardSetup" }
|
|
694
564
|
}
|
|
695
565
|
}
|
|
696
566
|
},
|
|
@@ -704,29 +574,29 @@
|
|
|
704
574
|
}
|
|
705
575
|
}
|
|
706
576
|
},
|
|
707
|
-
"/v1/billing/
|
|
577
|
+
"/v1/billing/card-setups/{setupId}/reconcile": {
|
|
708
578
|
"post": {
|
|
709
|
-
"operationId": "
|
|
710
|
-
"summary": "
|
|
711
|
-
"description": "Requires current organization
|
|
579
|
+
"operationId": "reconcileCardSetup",
|
|
580
|
+
"summary": "Save a confirmed card as the default",
|
|
581
|
+
"description": "Requires a current organization administrator. A person enters the card in the\nembeddable payment form; card numbers never pass through WhooshBang. A complete\nsetup makes the card the organization's one default card for credit, automatic\ntop-up, plans and add-ons. Opening a setup does not charge anything.\n",
|
|
712
582
|
"tags": ["Organization"],
|
|
713
583
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
714
584
|
"x-required-scopes": ["billing:write"],
|
|
715
585
|
"x-organization-membership": "required",
|
|
716
586
|
"parameters": [
|
|
717
587
|
{
|
|
718
|
-
"name": "
|
|
588
|
+
"name": "setupId",
|
|
719
589
|
"in": "path",
|
|
720
590
|
"required": true,
|
|
721
591
|
"schema": {
|
|
722
592
|
"type": "string",
|
|
723
|
-
"pattern": "^
|
|
593
|
+
"pattern": "^card_setup_[a-f0-9]{32}$"
|
|
724
594
|
}
|
|
725
595
|
}
|
|
726
596
|
],
|
|
727
597
|
"responses": {
|
|
728
598
|
"200": {
|
|
729
|
-
"description": "
|
|
599
|
+
"description": "Save a confirmed card as the default.",
|
|
730
600
|
"headers": {
|
|
731
601
|
"WhooshBang-Diagnostic-Id": {
|
|
732
602
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -734,9 +604,7 @@
|
|
|
734
604
|
},
|
|
735
605
|
"content": {
|
|
736
606
|
"application/json": {
|
|
737
|
-
"schema": {
|
|
738
|
-
"$ref": "#/components/schemas/ReconcileSubscriptionCheckoutResult"
|
|
739
|
-
}
|
|
607
|
+
"schema": { "$ref": "#/components/schemas/CardSetup" }
|
|
740
608
|
}
|
|
741
609
|
}
|
|
742
610
|
},
|
|
@@ -750,26 +618,29 @@
|
|
|
750
618
|
}
|
|
751
619
|
}
|
|
752
620
|
},
|
|
753
|
-
"/v1/
|
|
754
|
-
"
|
|
755
|
-
"operationId": "
|
|
756
|
-
"summary": "
|
|
757
|
-
"description": "Requires current organization
|
|
621
|
+
"/v1/billing/credit-purchases": {
|
|
622
|
+
"post": {
|
|
623
|
+
"operationId": "createCreditPurchase",
|
|
624
|
+
"summary": "Buy a credit pack with the default card",
|
|
625
|
+
"description": "Requires a current organization administrator. Charges the default card for one\ncredit pack; the pack amount is the explicit approval. Without a default card the\nrequest is refused with billing_card_required. Retrying with the same\nIdempotency-Key returns the same purchase and never charges twice. Credit is\ngranted only after the payment is verified.\n",
|
|
758
626
|
"tags": ["Organization"],
|
|
759
627
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
760
|
-
"x-required-scopes": ["
|
|
628
|
+
"x-required-scopes": ["billing:write"],
|
|
761
629
|
"x-organization-membership": "required",
|
|
762
|
-
"parameters": [
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
"
|
|
767
|
-
|
|
630
|
+
"parameters": [{ "$ref": "#/components/parameters/IdempotencyKey" }],
|
|
631
|
+
"requestBody": {
|
|
632
|
+
"required": true,
|
|
633
|
+
"content": {
|
|
634
|
+
"application/json": {
|
|
635
|
+
"schema": {
|
|
636
|
+
"$ref": "#/components/schemas/CreateCreditPurchaseRequest"
|
|
637
|
+
}
|
|
638
|
+
}
|
|
768
639
|
}
|
|
769
|
-
|
|
640
|
+
},
|
|
770
641
|
"responses": {
|
|
771
|
-
"
|
|
772
|
-
"description": "
|
|
642
|
+
"201": {
|
|
643
|
+
"description": "Buy a credit pack with the default card.",
|
|
773
644
|
"headers": {
|
|
774
645
|
"WhooshBang-Diagnostic-Id": {
|
|
775
646
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -777,7 +648,7 @@
|
|
|
777
648
|
},
|
|
778
649
|
"content": {
|
|
779
650
|
"application/json": {
|
|
780
|
-
"schema": { "$ref": "#/components/schemas/
|
|
651
|
+
"schema": { "$ref": "#/components/schemas/CreditPurchase" }
|
|
781
652
|
}
|
|
782
653
|
}
|
|
783
654
|
},
|
|
@@ -789,36 +660,31 @@
|
|
|
789
660
|
"429": { "$ref": "#/components/responses/RateLimited" },
|
|
790
661
|
"502": { "$ref": "#/components/responses/ProviderOutcomeUnknown" }
|
|
791
662
|
}
|
|
792
|
-
}
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
"
|
|
663
|
+
}
|
|
664
|
+
},
|
|
665
|
+
"/v1/billing/credit-purchases/{purchaseId}/reconcile": {
|
|
666
|
+
"post": {
|
|
667
|
+
"operationId": "reconcileCreditPurchase",
|
|
668
|
+
"summary": "Refresh a credit purchase",
|
|
669
|
+
"description": "Requires a current organization administrator. Charges the default card for one\ncredit pack; the pack amount is the explicit approval. Without a default card the\nrequest is refused with billing_card_required. Retrying with the same\nIdempotency-Key returns the same purchase and never charges twice. Credit is\ngranted only after the payment is verified.\nReconcile after the customer confirms the charge in the payment form.\n",
|
|
797
670
|
"tags": ["Organization"],
|
|
798
671
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
799
|
-
"x-required-scopes": ["
|
|
672
|
+
"x-required-scopes": ["billing:write"],
|
|
800
673
|
"x-organization-membership": "required",
|
|
801
674
|
"parameters": [
|
|
802
675
|
{
|
|
803
|
-
"name": "
|
|
676
|
+
"name": "purchaseId",
|
|
804
677
|
"in": "path",
|
|
805
678
|
"required": true,
|
|
806
|
-
"schema": {
|
|
807
|
-
|
|
808
|
-
|
|
809
|
-
"requestBody": {
|
|
810
|
-
"required": true,
|
|
811
|
-
"content": {
|
|
812
|
-
"application/json": {
|
|
813
|
-
"schema": {
|
|
814
|
-
"$ref": "#/components/schemas/UpdateProjectAttributionRequest"
|
|
815
|
-
}
|
|
679
|
+
"schema": {
|
|
680
|
+
"type": "string",
|
|
681
|
+
"pattern": "^credit_purchase_[a-f0-9]{32}$"
|
|
816
682
|
}
|
|
817
683
|
}
|
|
818
|
-
|
|
684
|
+
],
|
|
819
685
|
"responses": {
|
|
820
686
|
"200": {
|
|
821
|
-
"description": "
|
|
687
|
+
"description": "Refresh a credit purchase.",
|
|
822
688
|
"headers": {
|
|
823
689
|
"WhooshBang-Diagnostic-Id": {
|
|
824
690
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -826,7 +692,7 @@
|
|
|
826
692
|
},
|
|
827
693
|
"content": {
|
|
828
694
|
"application/json": {
|
|
829
|
-
"schema": { "$ref": "#/components/schemas/
|
|
695
|
+
"schema": { "$ref": "#/components/schemas/CreditPurchase" }
|
|
830
696
|
}
|
|
831
697
|
}
|
|
832
698
|
},
|
|
@@ -840,18 +706,23 @@
|
|
|
840
706
|
}
|
|
841
707
|
}
|
|
842
708
|
},
|
|
843
|
-
"/v1/billing": {
|
|
709
|
+
"/v1/billing/invoices": {
|
|
844
710
|
"get": {
|
|
845
|
-
"operationId": "
|
|
846
|
-
"summary": "
|
|
847
|
-
"description": "Requires a current organization administrator.
|
|
711
|
+
"operationId": "listBillingInvoices",
|
|
712
|
+
"summary": "List invoices and receipts",
|
|
713
|
+
"description": "Requires a current organization administrator. Returns the most recent\ncredit purchases, automatic top-ups, recurring invoices and the welcome credit,\nnewest first, each with its downloadable invoice or receipt where one exists.\n",
|
|
848
714
|
"tags": ["Organization"],
|
|
849
715
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
850
716
|
"x-required-scopes": ["billing:read"],
|
|
851
717
|
"x-organization-membership": "required",
|
|
718
|
+
"parameters": [
|
|
719
|
+
{ "$ref": "#/components/parameters/ListAfterCursor" },
|
|
720
|
+
{ "$ref": "#/components/parameters/ListPageLimit" },
|
|
721
|
+
{ "$ref": "#/components/parameters/PageNumber" }
|
|
722
|
+
],
|
|
852
723
|
"responses": {
|
|
853
724
|
"200": {
|
|
854
|
-
"description": "
|
|
725
|
+
"description": "List invoices and receipts.",
|
|
855
726
|
"headers": {
|
|
856
727
|
"WhooshBang-Diagnostic-Id": {
|
|
857
728
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -859,7 +730,9 @@
|
|
|
859
730
|
},
|
|
860
731
|
"content": {
|
|
861
732
|
"application/json": {
|
|
862
|
-
"schema": {
|
|
733
|
+
"schema": {
|
|
734
|
+
"$ref": "#/components/schemas/BillingInvoiceCollection"
|
|
735
|
+
}
|
|
863
736
|
}
|
|
864
737
|
}
|
|
865
738
|
},
|
|
@@ -873,29 +746,28 @@
|
|
|
873
746
|
}
|
|
874
747
|
}
|
|
875
748
|
},
|
|
876
|
-
"/v1/billing/
|
|
877
|
-
"
|
|
878
|
-
"operationId": "
|
|
879
|
-
"summary": "
|
|
880
|
-
"description": "Requires a current organization administrator.
|
|
749
|
+
"/v1/billing/receipt-email": {
|
|
750
|
+
"put": {
|
|
751
|
+
"operationId": "updateBillingReceiptEmail",
|
|
752
|
+
"summary": "Choose where receipts are emailed",
|
|
753
|
+
"description": "Requires a current organization administrator. Receipts and invoices for\nevery charge go to this address. Null stops them.\n",
|
|
881
754
|
"tags": ["Organization"],
|
|
882
755
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
883
756
|
"x-required-scopes": ["billing:write"],
|
|
884
757
|
"x-organization-membership": "required",
|
|
885
|
-
"parameters": [{ "$ref": "#/components/parameters/IdempotencyKey" }],
|
|
886
758
|
"requestBody": {
|
|
887
759
|
"required": true,
|
|
888
760
|
"content": {
|
|
889
761
|
"application/json": {
|
|
890
762
|
"schema": {
|
|
891
|
-
"$ref": "#/components/schemas/
|
|
763
|
+
"$ref": "#/components/schemas/UpdateBillingReceiptEmailRequest"
|
|
892
764
|
}
|
|
893
765
|
}
|
|
894
766
|
}
|
|
895
767
|
},
|
|
896
768
|
"responses": {
|
|
897
|
-
"
|
|
898
|
-
"description": "
|
|
769
|
+
"200": {
|
|
770
|
+
"description": "Choose where receipts are emailed.",
|
|
899
771
|
"headers": {
|
|
900
772
|
"WhooshBang-Diagnostic-Id": {
|
|
901
773
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -903,7 +775,7 @@
|
|
|
903
775
|
},
|
|
904
776
|
"content": {
|
|
905
777
|
"application/json": {
|
|
906
|
-
"schema": { "$ref": "#/components/schemas/
|
|
778
|
+
"schema": { "$ref": "#/components/schemas/BillingAccount" }
|
|
907
779
|
}
|
|
908
780
|
}
|
|
909
781
|
},
|
|
@@ -917,26 +789,18 @@
|
|
|
917
789
|
}
|
|
918
790
|
}
|
|
919
791
|
},
|
|
920
|
-
"/v1/billing
|
|
921
|
-
"
|
|
922
|
-
"operationId": "
|
|
923
|
-
"summary": "
|
|
924
|
-
"description": "Requires a current organization administrator. Bundle bonus funds core sends only.\nShared email uses purchased or starter credit at $1 per 1,000.\
|
|
792
|
+
"/v1/billing": {
|
|
793
|
+
"get": {
|
|
794
|
+
"operationId": "getBillingAccount",
|
|
795
|
+
"summary": "Read account delivery credit",
|
|
796
|
+
"description": "Requires a current organization administrator. Bundle bonus funds core sends only.\nShared email uses purchased or starter credit at $1 per 1,000.\nCredit is granted only after a verified payment. card is the one default card;\nreceipt_email is where receipts go.\n",
|
|
925
797
|
"tags": ["Organization"],
|
|
926
798
|
"security": [{ "clerkSession": [] }, { "bearerGrant": [] }],
|
|
927
|
-
"x-required-scopes": ["billing:
|
|
799
|
+
"x-required-scopes": ["billing:read"],
|
|
928
800
|
"x-organization-membership": "required",
|
|
929
|
-
"parameters": [
|
|
930
|
-
{
|
|
931
|
-
"name": "checkoutId",
|
|
932
|
-
"in": "path",
|
|
933
|
-
"required": true,
|
|
934
|
-
"schema": { "type": "string", "pattern": "^checkout_[a-f0-9]{32}$" }
|
|
935
|
-
}
|
|
936
|
-
],
|
|
937
801
|
"responses": {
|
|
938
802
|
"200": {
|
|
939
|
-
"description": "
|
|
803
|
+
"description": "Read account delivery credit.",
|
|
940
804
|
"headers": {
|
|
941
805
|
"WhooshBang-Diagnostic-Id": {
|
|
942
806
|
"$ref": "#/components/headers/DiagnosticId"
|
|
@@ -944,9 +808,7 @@
|
|
|
944
808
|
},
|
|
945
809
|
"content": {
|
|
946
810
|
"application/json": {
|
|
947
|
-
"schema": {
|
|
948
|
-
"$ref": "#/components/schemas/ReconcileWalletCheckoutResult"
|
|
949
|
-
}
|
|
811
|
+
"schema": { "$ref": "#/components/schemas/BillingAccount" }
|
|
950
812
|
}
|
|
951
813
|
}
|
|
952
814
|
},
|
|
@@ -12169,14 +12031,6 @@
|
|
|
12169
12031
|
"additionalProperties": false,
|
|
12170
12032
|
"description": "Replace the requested active project selection with owned, active projects within current paid capacity. An empty selection releases all slots."
|
|
12171
12033
|
},
|
|
12172
|
-
"BillingPortalSession": {
|
|
12173
|
-
"type": "object",
|
|
12174
|
-
"required": ["portal_url"],
|
|
12175
|
-
"properties": {
|
|
12176
|
-
"portal_url": { "type": "string", "format": "uri", "maxLength": 4096 }
|
|
12177
|
-
},
|
|
12178
|
-
"additionalProperties": false
|
|
12179
|
-
},
|
|
12180
12034
|
"BillingEntitlements": {
|
|
12181
12035
|
"type": "object",
|
|
12182
12036
|
"required": [
|
|
@@ -12188,11 +12042,10 @@
|
|
|
12188
12042
|
"live_notifications_remaining",
|
|
12189
12043
|
"shared_emails_remaining",
|
|
12190
12044
|
"allowance_period_end",
|
|
12191
|
-
"recurring_checkout_available",
|
|
12192
12045
|
"offers",
|
|
12193
|
-
"
|
|
12194
|
-
"
|
|
12195
|
-
"
|
|
12046
|
+
"has_subscription",
|
|
12047
|
+
"recurring_available",
|
|
12048
|
+
"payment_issue"
|
|
12196
12049
|
],
|
|
12197
12050
|
"properties": {
|
|
12198
12051
|
"content_retention_days": {
|
|
@@ -12229,7 +12082,10 @@
|
|
|
12229
12082
|
{ "type": "null" }
|
|
12230
12083
|
]
|
|
12231
12084
|
},
|
|
12232
|
-
"
|
|
12085
|
+
"recurring_available": {
|
|
12086
|
+
"type": "boolean",
|
|
12087
|
+
"description": "Whether plans and add-ons can be bought now. False when the deployment has no recurring catalog or cannot take payments."
|
|
12088
|
+
},
|
|
12233
12089
|
"offers": {
|
|
12234
12090
|
"type": "array",
|
|
12235
12091
|
"items": {
|
|
@@ -12272,46 +12128,58 @@
|
|
|
12272
12128
|
"additionalProperties": false
|
|
12273
12129
|
}
|
|
12274
12130
|
},
|
|
12275
|
-
"pending_subscription_checkout_id": {
|
|
12276
|
-
"type": ["string", "null"],
|
|
12277
|
-
"pattern": "^subscription_checkout_[a-f0-9]{32}$",
|
|
12278
|
-
"minLength": 54,
|
|
12279
|
-
"maxLength": 54
|
|
12280
|
-
},
|
|
12281
|
-
"subscription_management_available": { "type": "boolean" },
|
|
12282
12131
|
"has_subscription": { "type": "boolean" },
|
|
12283
12132
|
"pending_subscription_change_id": {
|
|
12284
12133
|
"type": ["string", "null"],
|
|
12285
12134
|
"pattern": "^subscription_change_[a-f0-9]{32}$",
|
|
12286
12135
|
"minLength": 52,
|
|
12287
12136
|
"maxLength": 52
|
|
12137
|
+
},
|
|
12138
|
+
"payment_issue": {
|
|
12139
|
+
"anyOf": [
|
|
12140
|
+
{ "type": "null" },
|
|
12141
|
+
{
|
|
12142
|
+
"type": "object",
|
|
12143
|
+
"additionalProperties": false,
|
|
12144
|
+
"required": ["amount_usd", "next_attempt_at"],
|
|
12145
|
+
"properties": {
|
|
12146
|
+
"amount_usd": {
|
|
12147
|
+
"type": "string",
|
|
12148
|
+
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
|
12149
|
+
"maxLength": 40
|
|
12150
|
+
},
|
|
12151
|
+
"next_attempt_at": {
|
|
12152
|
+
"anyOf": [
|
|
12153
|
+
{ "type": "string", "format": "date-time" },
|
|
12154
|
+
{ "type": "null" }
|
|
12155
|
+
]
|
|
12156
|
+
}
|
|
12157
|
+
}
|
|
12158
|
+
}
|
|
12159
|
+
],
|
|
12160
|
+
"description": "A recurring charge the default card did not pay. Paid access continues until the paid boundary; another attempt follows at next_attempt_at, or none when null. Update the card to settle it."
|
|
12288
12161
|
}
|
|
12289
12162
|
},
|
|
12290
12163
|
"additionalProperties": false
|
|
12291
12164
|
},
|
|
12292
|
-
"
|
|
12165
|
+
"SubscriptionSelection": {
|
|
12293
12166
|
"type": "object",
|
|
12294
12167
|
"required": ["plan", "hide_attribution", "additional_projects"],
|
|
12295
12168
|
"properties": {
|
|
12296
12169
|
"plan": { "type": "string", "enum": ["payg", "team", "agency"] },
|
|
12297
|
-
"hide_attribution": {
|
|
12170
|
+
"hide_attribution": {
|
|
12171
|
+
"type": "boolean",
|
|
12172
|
+
"description": "Remove WhooshBang branding from recipient emails, messages and subscription pages."
|
|
12173
|
+
},
|
|
12298
12174
|
"additional_projects": {
|
|
12299
12175
|
"type": "integer",
|
|
12300
12176
|
"minimum": 0,
|
|
12301
|
-
"maximum": 10000
|
|
12177
|
+
"maximum": 10000,
|
|
12178
|
+
"description": "Extra projects beyond the plan's included projects, each billed monthly."
|
|
12302
12179
|
}
|
|
12303
12180
|
},
|
|
12304
12181
|
"additionalProperties": false,
|
|
12305
|
-
"description": "
|
|
12306
|
-
"anyOf": [
|
|
12307
|
-
{ "properties": { "plan": { "enum": ["team", "agency"] } } },
|
|
12308
|
-
{ "properties": { "hide_attribution": { "const": true } } },
|
|
12309
|
-
{
|
|
12310
|
-
"properties": {
|
|
12311
|
-
"additional_projects": { "minimum": 1, "type": "integer" }
|
|
12312
|
-
}
|
|
12313
|
-
}
|
|
12314
|
-
]
|
|
12182
|
+
"description": "An account's recurring selection: a plan, branding removal and extra projects. The server selects approved prices and allowances. Branding removal is included on Team and Agency; Pay as you go may add it. Choosing Pay as you go with nothing else ends every recurring charge at the paid boundary."
|
|
12315
12183
|
},
|
|
12316
12184
|
"SubscriptionChange": {
|
|
12317
12185
|
"type": "object",
|
|
@@ -12325,7 +12193,9 @@
|
|
|
12325
12193
|
"unused_time_credit_usd",
|
|
12326
12194
|
"effective_at",
|
|
12327
12195
|
"expires_at",
|
|
12328
|
-
"
|
|
12196
|
+
"client_secret",
|
|
12197
|
+
"failure",
|
|
12198
|
+
"publishable_key"
|
|
12329
12199
|
],
|
|
12330
12200
|
"properties": {
|
|
12331
12201
|
"id": {
|
|
@@ -12334,7 +12204,10 @@
|
|
|
12334
12204
|
"minLength": 52,
|
|
12335
12205
|
"maxLength": 52
|
|
12336
12206
|
},
|
|
12337
|
-
"kind": {
|
|
12207
|
+
"kind": {
|
|
12208
|
+
"type": "string",
|
|
12209
|
+
"enum": ["start", "upgrade", "boundary"]
|
|
12210
|
+
},
|
|
12338
12211
|
"status": {
|
|
12339
12212
|
"type": "string",
|
|
12340
12213
|
"enum": [
|
|
@@ -12346,9 +12219,7 @@
|
|
|
12346
12219
|
"expired"
|
|
12347
12220
|
]
|
|
12348
12221
|
},
|
|
12349
|
-
"selection": {
|
|
12350
|
-
"$ref": "#/components/schemas/CreateSubscriptionCheckoutRequest"
|
|
12351
|
-
},
|
|
12222
|
+
"selection": { "$ref": "#/components/schemas/SubscriptionSelection" },
|
|
12352
12223
|
"monthly_price_usd": {
|
|
12353
12224
|
"type": "string",
|
|
12354
12225
|
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
|
@@ -12381,61 +12252,47 @@
|
|
|
12381
12252
|
]
|
|
12382
12253
|
},
|
|
12383
12254
|
"expires_at": { "type": "string", "format": "date-time" },
|
|
12384
|
-
"
|
|
12255
|
+
"client_secret": {
|
|
12385
12256
|
"anyOf": [
|
|
12386
|
-
{ "type": "string", "
|
|
12257
|
+
{ "type": "string", "minLength": 1, "maxLength": 512 },
|
|
12387
12258
|
{ "type": "null" }
|
|
12388
|
-
]
|
|
12389
|
-
|
|
12390
|
-
},
|
|
12391
|
-
"additionalProperties": false,
|
|
12392
|
-
"description": "An owned immutable recurring selection. A reserved quote has not charged a card. Confirm its exact immediate cash charge; paid upgrades reset the cycle and carry unused paid time, while reductions start at the existing paid boundary. Processing or pending outcomes must be recovered without starting another change."
|
|
12393
|
-
},
|
|
12394
|
-
"ConfirmSubscriptionChangeRequest": {
|
|
12395
|
-
"type": "object",
|
|
12396
|
-
"required": ["approved_charge_now_usd"],
|
|
12397
|
-
"properties": {
|
|
12398
|
-
"approved_charge_now_usd": {
|
|
12399
|
-
"type": "string",
|
|
12400
|
-
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
|
12401
|
-
"maxLength": 40,
|
|
12402
|
-
"description": "The exact charge_now_usd from the saved quote; cents only, for explicit card-charge approval."
|
|
12403
|
-
}
|
|
12404
|
-
},
|
|
12405
|
-
"additionalProperties": false
|
|
12406
|
-
},
|
|
12407
|
-
"SubscriptionCheckout": {
|
|
12408
|
-
"type": "object",
|
|
12409
|
-
"required": ["id", "status", "checkout_url"],
|
|
12410
|
-
"properties": {
|
|
12411
|
-
"id": {
|
|
12412
|
-
"type": "string",
|
|
12413
|
-
"pattern": "^subscription_checkout_[a-f0-9]{32}$",
|
|
12414
|
-
"minLength": 54,
|
|
12415
|
-
"maxLength": 54
|
|
12259
|
+
],
|
|
12260
|
+
"description": "Present only while the card issuer asks the customer to confirm this charge in the payment form."
|
|
12416
12261
|
},
|
|
12417
|
-
"
|
|
12418
|
-
"
|
|
12419
|
-
|
|
12262
|
+
"publishable_key": {
|
|
12263
|
+
"anyOf": [
|
|
12264
|
+
{
|
|
12265
|
+
"type": "string",
|
|
12266
|
+
"pattern": "^pk_(test|live)_[A-Za-z0-9]{1,250}$"
|
|
12267
|
+
},
|
|
12268
|
+
{ "type": "null" }
|
|
12269
|
+
],
|
|
12270
|
+
"description": "The public key the payment form uses with client_secret. Present only with client_secret."
|
|
12420
12271
|
},
|
|
12421
|
-
"
|
|
12272
|
+
"failure": {
|
|
12422
12273
|
"anyOf": [
|
|
12423
|
-
{
|
|
12274
|
+
{
|
|
12275
|
+
"type": "string",
|
|
12276
|
+
"enum": ["card_declined", "authentication_failed"]
|
|
12277
|
+
},
|
|
12424
12278
|
{ "type": "null" }
|
|
12425
|
-
]
|
|
12279
|
+
],
|
|
12280
|
+
"description": "Why the last charge attempt failed. Update the card, then confirm again."
|
|
12426
12281
|
}
|
|
12427
12282
|
},
|
|
12428
|
-
"additionalProperties": false
|
|
12283
|
+
"additionalProperties": false,
|
|
12284
|
+
"description": "An owned recurring selection. A reserved quote has not charged anything. start buys the first plan or add-on; upgrade charges now, resets the cycle and credits unused paid time; boundary reductions start at the existing paid boundary. Confirm the exact immediate charge; the default card pays it. Processing or pending changes are recovered, never repeated."
|
|
12429
12285
|
},
|
|
12430
|
-
"
|
|
12286
|
+
"ConfirmSubscriptionChangeRequest": {
|
|
12431
12287
|
"type": "object",
|
|
12432
|
-
"required": ["
|
|
12288
|
+
"required": ["approved_charge_now_usd"],
|
|
12433
12289
|
"properties": {
|
|
12434
|
-
"
|
|
12290
|
+
"approved_charge_now_usd": {
|
|
12435
12291
|
"type": "string",
|
|
12436
|
-
"
|
|
12437
|
-
|
|
12438
|
-
|
|
12292
|
+
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
|
12293
|
+
"maxLength": 40,
|
|
12294
|
+
"description": "The exact charge_now_usd from the saved quote; cents only, for explicit card-charge approval."
|
|
12295
|
+
}
|
|
12439
12296
|
},
|
|
12440
12297
|
"additionalProperties": false
|
|
12441
12298
|
},
|
|
@@ -12498,8 +12355,8 @@
|
|
|
12498
12355
|
"available",
|
|
12499
12356
|
"monthly_reserved_cents",
|
|
12500
12357
|
"state",
|
|
12501
|
-
"
|
|
12502
|
-
"
|
|
12358
|
+
"card",
|
|
12359
|
+
"last_purchase"
|
|
12503
12360
|
],
|
|
12504
12361
|
"properties": {
|
|
12505
12362
|
"enabled": { "type": "boolean" },
|
|
@@ -12534,61 +12391,46 @@
|
|
|
12534
12391
|
"monthly_cap_reached"
|
|
12535
12392
|
]
|
|
12536
12393
|
},
|
|
12537
|
-
"
|
|
12394
|
+
"card": {
|
|
12395
|
+
"anyOf": [
|
|
12396
|
+
{ "type": "null" },
|
|
12397
|
+
{ "$ref": "#/components/schemas/BillingCard" }
|
|
12398
|
+
]
|
|
12399
|
+
},
|
|
12400
|
+
"last_purchase": {
|
|
12538
12401
|
"anyOf": [
|
|
12539
12402
|
{ "type": "null" },
|
|
12540
12403
|
{
|
|
12541
12404
|
"type": "object",
|
|
12542
12405
|
"additionalProperties": false,
|
|
12543
|
-
"required": [
|
|
12406
|
+
"required": [
|
|
12407
|
+
"id",
|
|
12408
|
+
"purchase_cents",
|
|
12409
|
+
"credit_usd",
|
|
12410
|
+
"completed_at"
|
|
12411
|
+
],
|
|
12544
12412
|
"properties": {
|
|
12545
|
-
"
|
|
12413
|
+
"id": {
|
|
12546
12414
|
"type": "string",
|
|
12547
|
-
"
|
|
12548
|
-
|
|
12415
|
+
"pattern": "^auto_top_up_[a-f0-9]{32}$"
|
|
12416
|
+
},
|
|
12417
|
+
"purchase_cents": {
|
|
12418
|
+
"type": "integer",
|
|
12419
|
+
"enum": [500, 1000, 2500, 5000, 10000]
|
|
12420
|
+
},
|
|
12421
|
+
"credit_usd": {
|
|
12422
|
+
"type": "string",
|
|
12423
|
+
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
|
12424
|
+
"maxLength": 40
|
|
12549
12425
|
},
|
|
12550
|
-
"
|
|
12426
|
+
"completed_at": { "type": "string", "format": "date-time" }
|
|
12551
12427
|
}
|
|
12552
12428
|
}
|
|
12553
|
-
]
|
|
12554
|
-
|
|
12555
|
-
"pending_setup_id": {
|
|
12556
|
-
"type": ["string", "null"],
|
|
12557
|
-
"pattern": "^auto_top_up_setup_[a-f0-9]{32}$"
|
|
12558
|
-
}
|
|
12559
|
-
}
|
|
12560
|
-
},
|
|
12561
|
-
"AutoTopUpSetup": {
|
|
12562
|
-
"type": "object",
|
|
12563
|
-
"additionalProperties": false,
|
|
12564
|
-
"required": ["id", "status", "checkout_url"],
|
|
12565
|
-
"properties": {
|
|
12566
|
-
"id": {
|
|
12567
|
-
"type": "string",
|
|
12568
|
-
"pattern": "^auto_top_up_setup_[a-f0-9]{32}$"
|
|
12569
|
-
},
|
|
12570
|
-
"status": {
|
|
12571
|
-
"type": "string",
|
|
12572
|
-
"enum": ["open", "complete", "expired"]
|
|
12573
|
-
},
|
|
12574
|
-
"checkout_url": {
|
|
12575
|
-
"type": ["string", "null"],
|
|
12576
|
-
"format": "uri",
|
|
12577
|
-
"maxLength": 4096
|
|
12429
|
+
],
|
|
12430
|
+
"description": "The most recent paid automatic purchase, if any."
|
|
12578
12431
|
}
|
|
12579
|
-
}
|
|
12580
|
-
|
|
12581
|
-
"ReconcileAutoTopUpSetupResult": {
|
|
12582
|
-
"type": "object",
|
|
12583
|
-
"additionalProperties": false,
|
|
12584
|
-
"required": ["outcome", "settings"],
|
|
12585
|
-
"properties": {
|
|
12586
|
-
"outcome": {
|
|
12587
|
-
"type": "string",
|
|
12588
|
-
"enum": ["applied", "unpaid", "ignored"]
|
|
12589
|
-
},
|
|
12590
|
-
"settings": { "$ref": "#/components/schemas/AutoTopUpSettings" }
|
|
12591
|
-
}
|
|
12432
|
+
},
|
|
12433
|
+
"description": "Automatic top-up is off by default. When on, the default card buys the selected pack whenever credit falls below the trigger. The monthly cap counts pending and paid purchases started in each UTC calendar month; refunds do not restore it. Turning it off stops future purchases; one already processing may finish. needs_card means there is no default card yet."
|
|
12592
12434
|
},
|
|
12593
12435
|
"BillingAccount": {
|
|
12594
12436
|
"type": "object",
|
|
@@ -12602,8 +12444,10 @@
|
|
|
12602
12444
|
"available_email_credit_usd",
|
|
12603
12445
|
"core_price_per_1000_usd",
|
|
12604
12446
|
"shared_email_price_per_1000_usd",
|
|
12605
|
-
"
|
|
12606
|
-
"packs"
|
|
12447
|
+
"purchases_available",
|
|
12448
|
+
"packs",
|
|
12449
|
+
"card",
|
|
12450
|
+
"receipt_email"
|
|
12607
12451
|
],
|
|
12608
12452
|
"properties": {
|
|
12609
12453
|
"currency": { "const": "USD" },
|
|
@@ -12634,7 +12478,10 @@
|
|
|
12634
12478
|
},
|
|
12635
12479
|
"core_price_per_1000_usd": { "const": "3.000000" },
|
|
12636
12480
|
"shared_email_price_per_1000_usd": { "const": "1.000000" },
|
|
12637
|
-
"
|
|
12481
|
+
"purchases_available": {
|
|
12482
|
+
"type": "boolean",
|
|
12483
|
+
"description": "Whether this deployment can take card payments now. When false, credit, plans and add-ons cannot be bought."
|
|
12484
|
+
},
|
|
12638
12485
|
"packs": {
|
|
12639
12486
|
"type": "array",
|
|
12640
12487
|
"items": {
|
|
@@ -12653,11 +12500,76 @@
|
|
|
12653
12500
|
}
|
|
12654
12501
|
}
|
|
12655
12502
|
}
|
|
12503
|
+
},
|
|
12504
|
+
"card": {
|
|
12505
|
+
"anyOf": [
|
|
12506
|
+
{ "type": "null" },
|
|
12507
|
+
{ "$ref": "#/components/schemas/BillingCard" }
|
|
12508
|
+
]
|
|
12509
|
+
},
|
|
12510
|
+
"receipt_email": {
|
|
12511
|
+
"anyOf": [
|
|
12512
|
+
{ "type": "null" },
|
|
12513
|
+
{ "$ref": "#/components/schemas/EmailAddress" }
|
|
12514
|
+
],
|
|
12515
|
+
"description": "Where receipts and invoices are emailed. Null sends none."
|
|
12516
|
+
}
|
|
12517
|
+
},
|
|
12518
|
+
"description": "Shared account message credit. Bonus funds core sends only; shared email draws purchased or starter credit. Amounts are exact USD decimal strings. Negative purchased or bonus balances retain refund debt and are not spendable."
|
|
12519
|
+
},
|
|
12520
|
+
"BillingCard": {
|
|
12521
|
+
"type": "object",
|
|
12522
|
+
"additionalProperties": false,
|
|
12523
|
+
"required": ["brand", "last_four", "exp_month", "exp_year"],
|
|
12524
|
+
"properties": {
|
|
12525
|
+
"brand": { "type": "string", "minLength": 1, "maxLength": 32 },
|
|
12526
|
+
"last_four": { "type": "string", "pattern": "^[0-9]{4}$" },
|
|
12527
|
+
"exp_month": { "type": "integer", "minimum": 1, "maximum": 12 },
|
|
12528
|
+
"exp_year": { "type": "integer", "minimum": 2000, "maximum": 9999 }
|
|
12529
|
+
},
|
|
12530
|
+
"description": "The organization's one default card. It pays for credit, automatic top-up, plans and add-ons. Only the brand, last four digits and expiry are ever returned."
|
|
12531
|
+
},
|
|
12532
|
+
"CardSetup": {
|
|
12533
|
+
"type": "object",
|
|
12534
|
+
"additionalProperties": false,
|
|
12535
|
+
"required": [
|
|
12536
|
+
"id",
|
|
12537
|
+
"status",
|
|
12538
|
+
"client_secret",
|
|
12539
|
+
"publishable_key",
|
|
12540
|
+
"card"
|
|
12541
|
+
],
|
|
12542
|
+
"properties": {
|
|
12543
|
+
"id": { "type": "string", "pattern": "^card_setup_[a-f0-9]{32}$" },
|
|
12544
|
+
"status": {
|
|
12545
|
+
"type": "string",
|
|
12546
|
+
"enum": ["open", "complete", "expired"]
|
|
12547
|
+
},
|
|
12548
|
+
"client_secret": {
|
|
12549
|
+
"anyOf": [
|
|
12550
|
+
{ "type": "string", "minLength": 1, "maxLength": 512 },
|
|
12551
|
+
{ "type": "null" }
|
|
12552
|
+
]
|
|
12553
|
+
},
|
|
12554
|
+
"publishable_key": {
|
|
12555
|
+
"anyOf": [
|
|
12556
|
+
{
|
|
12557
|
+
"type": "string",
|
|
12558
|
+
"pattern": "^pk_(test|live)_[A-Za-z0-9]{1,250}$"
|
|
12559
|
+
},
|
|
12560
|
+
{ "type": "null" }
|
|
12561
|
+
]
|
|
12562
|
+
},
|
|
12563
|
+
"card": {
|
|
12564
|
+
"anyOf": [
|
|
12565
|
+
{ "type": "null" },
|
|
12566
|
+
{ "$ref": "#/components/schemas/BillingCard" }
|
|
12567
|
+
]
|
|
12656
12568
|
}
|
|
12657
12569
|
},
|
|
12658
|
-
"description": "
|
|
12570
|
+
"description": "A card form session. A person enters the card in the embeddable payment form mounted with client_secret and publishable_key, then reconciles. A complete setup makes that card the one default card. client_secret is present only while open."
|
|
12659
12571
|
},
|
|
12660
|
-
"
|
|
12572
|
+
"CreateCreditPurchaseRequest": {
|
|
12661
12573
|
"type": "object",
|
|
12662
12574
|
"additionalProperties": false,
|
|
12663
12575
|
"required": ["purchase_cents"],
|
|
@@ -12666,36 +12578,202 @@
|
|
|
12666
12578
|
"type": "integer",
|
|
12667
12579
|
"enum": [500, 1000, 2500, 5000, 10000]
|
|
12668
12580
|
}
|
|
12669
|
-
}
|
|
12581
|
+
},
|
|
12582
|
+
"description": "Buy one credit pack now with the default card. The amount is the explicit approval of the charge."
|
|
12670
12583
|
},
|
|
12671
|
-
"
|
|
12584
|
+
"CreditPurchase": {
|
|
12672
12585
|
"type": "object",
|
|
12673
12586
|
"additionalProperties": false,
|
|
12674
|
-
"required": [
|
|
12587
|
+
"required": [
|
|
12588
|
+
"id",
|
|
12589
|
+
"purchase_cents",
|
|
12590
|
+
"credit_usd",
|
|
12591
|
+
"status",
|
|
12592
|
+
"failure",
|
|
12593
|
+
"client_secret",
|
|
12594
|
+
"card",
|
|
12595
|
+
"publishable_key"
|
|
12596
|
+
],
|
|
12675
12597
|
"properties": {
|
|
12676
|
-
"id": {
|
|
12598
|
+
"id": {
|
|
12599
|
+
"type": "string",
|
|
12600
|
+
"pattern": "^credit_purchase_[a-f0-9]{32}$"
|
|
12601
|
+
},
|
|
12602
|
+
"purchase_cents": {
|
|
12603
|
+
"type": "integer",
|
|
12604
|
+
"enum": [500, 1000, 2500, 5000, 10000]
|
|
12605
|
+
},
|
|
12606
|
+
"credit_usd": {
|
|
12607
|
+
"type": "string",
|
|
12608
|
+
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
|
12609
|
+
"maxLength": 40
|
|
12610
|
+
},
|
|
12677
12611
|
"status": {
|
|
12678
12612
|
"type": "string",
|
|
12679
|
-
"enum": ["
|
|
12613
|
+
"enum": ["processing", "requires_action", "paid", "failed"]
|
|
12680
12614
|
},
|
|
12681
|
-
"
|
|
12682
|
-
"
|
|
12683
|
-
|
|
12684
|
-
|
|
12685
|
-
|
|
12686
|
-
|
|
12615
|
+
"failure": {
|
|
12616
|
+
"anyOf": [
|
|
12617
|
+
{
|
|
12618
|
+
"type": "string",
|
|
12619
|
+
"enum": ["card_declined", "authentication_failed"]
|
|
12620
|
+
},
|
|
12621
|
+
{ "type": "null" }
|
|
12622
|
+
]
|
|
12623
|
+
},
|
|
12624
|
+
"client_secret": {
|
|
12625
|
+
"anyOf": [
|
|
12626
|
+
{ "type": "string", "minLength": 1, "maxLength": 512 },
|
|
12627
|
+
{ "type": "null" }
|
|
12628
|
+
]
|
|
12629
|
+
},
|
|
12630
|
+
"publishable_key": {
|
|
12631
|
+
"anyOf": [
|
|
12632
|
+
{
|
|
12633
|
+
"type": "string",
|
|
12634
|
+
"pattern": "^pk_(test|live)_[A-Za-z0-9]{1,250}$"
|
|
12635
|
+
},
|
|
12636
|
+
{ "type": "null" }
|
|
12637
|
+
],
|
|
12638
|
+
"description": "The public key the payment form uses with client_secret. Present only with client_secret."
|
|
12639
|
+
},
|
|
12640
|
+
"card": { "$ref": "#/components/schemas/BillingCard" }
|
|
12641
|
+
},
|
|
12642
|
+
"description": "A credit pack charged to the default card. paid means the credit is in the balance. requires_action means the card issuer asks the customer to confirm in the payment form using client_secret; reconcile afterwards. A failed purchase charged nothing; start a new one after updating the card."
|
|
12687
12643
|
},
|
|
12688
|
-
"
|
|
12644
|
+
"BillingInvoice": {
|
|
12689
12645
|
"type": "object",
|
|
12690
12646
|
"additionalProperties": false,
|
|
12691
|
-
"required": [
|
|
12647
|
+
"required": [
|
|
12648
|
+
"id",
|
|
12649
|
+
"kind",
|
|
12650
|
+
"created_at",
|
|
12651
|
+
"amount_usd",
|
|
12652
|
+
"status",
|
|
12653
|
+
"purchase_cents",
|
|
12654
|
+
"items",
|
|
12655
|
+
"period_start",
|
|
12656
|
+
"period_end",
|
|
12657
|
+
"document_url",
|
|
12658
|
+
"document_kind"
|
|
12659
|
+
],
|
|
12692
12660
|
"properties": {
|
|
12693
|
-
"
|
|
12661
|
+
"id": { "type": "string", "minLength": 1, "maxLength": 255 },
|
|
12662
|
+
"kind": {
|
|
12663
|
+
"type": "string",
|
|
12664
|
+
"enum": [
|
|
12665
|
+
"credit",
|
|
12666
|
+
"automatic_top_up",
|
|
12667
|
+
"recurring",
|
|
12668
|
+
"welcome_credit"
|
|
12669
|
+
]
|
|
12670
|
+
},
|
|
12671
|
+
"created_at": { "type": "string", "format": "date-time" },
|
|
12672
|
+
"amount_usd": {
|
|
12694
12673
|
"type": "string",
|
|
12695
|
-
"
|
|
12674
|
+
"pattern": "^(0|[1-9][0-9]*)\\.[0-9]{6}$",
|
|
12675
|
+
"maxLength": 40
|
|
12696
12676
|
},
|
|
12697
|
-
"
|
|
12698
|
-
|
|
12677
|
+
"status": {
|
|
12678
|
+
"type": "string",
|
|
12679
|
+
"enum": [
|
|
12680
|
+
"paid",
|
|
12681
|
+
"open",
|
|
12682
|
+
"void",
|
|
12683
|
+
"uncollectible",
|
|
12684
|
+
"refunded",
|
|
12685
|
+
"free"
|
|
12686
|
+
]
|
|
12687
|
+
},
|
|
12688
|
+
"purchase_cents": {
|
|
12689
|
+
"anyOf": [
|
|
12690
|
+
{ "type": "integer", "enum": [500, 1000, 2500, 5000, 10000] },
|
|
12691
|
+
{ "type": "null" }
|
|
12692
|
+
]
|
|
12693
|
+
},
|
|
12694
|
+
"items": {
|
|
12695
|
+
"type": "array",
|
|
12696
|
+
"maxItems": 3,
|
|
12697
|
+
"items": {
|
|
12698
|
+
"type": "object",
|
|
12699
|
+
"additionalProperties": false,
|
|
12700
|
+
"required": ["kind", "quantity"],
|
|
12701
|
+
"properties": {
|
|
12702
|
+
"kind": {
|
|
12703
|
+
"type": "string",
|
|
12704
|
+
"enum": ["team", "agency", "attribution", "project"]
|
|
12705
|
+
},
|
|
12706
|
+
"quantity": {
|
|
12707
|
+
"type": "integer",
|
|
12708
|
+
"minimum": 1,
|
|
12709
|
+
"maximum": 10025
|
|
12710
|
+
}
|
|
12711
|
+
}
|
|
12712
|
+
}
|
|
12713
|
+
},
|
|
12714
|
+
"period_start": {
|
|
12715
|
+
"anyOf": [
|
|
12716
|
+
{ "type": "string", "format": "date-time" },
|
|
12717
|
+
{ "type": "null" }
|
|
12718
|
+
]
|
|
12719
|
+
},
|
|
12720
|
+
"period_end": {
|
|
12721
|
+
"anyOf": [
|
|
12722
|
+
{ "type": "string", "format": "date-time" },
|
|
12723
|
+
{ "type": "null" }
|
|
12724
|
+
]
|
|
12725
|
+
},
|
|
12726
|
+
"document_url": {
|
|
12727
|
+
"anyOf": [
|
|
12728
|
+
{ "type": "string", "format": "uri", "maxLength": 4096 },
|
|
12729
|
+
{ "type": "null" }
|
|
12730
|
+
]
|
|
12731
|
+
},
|
|
12732
|
+
"document_kind": {
|
|
12733
|
+
"anyOf": [
|
|
12734
|
+
{ "type": "string", "enum": ["invoice", "receipt"] },
|
|
12735
|
+
{ "type": "null" }
|
|
12736
|
+
]
|
|
12737
|
+
}
|
|
12738
|
+
},
|
|
12739
|
+
"description": "One charge or credit grant. Credit purchases carry purchase_cents; recurring invoices carry their items and paid period. document_url downloads the invoice PDF or opens the receipt."
|
|
12740
|
+
},
|
|
12741
|
+
"BillingInvoiceCollection": {
|
|
12742
|
+
"type": "object",
|
|
12743
|
+
"description": "A page of invoices and receipts, newest first.",
|
|
12744
|
+
"required": ["items"],
|
|
12745
|
+
"properties": {
|
|
12746
|
+
"items": {
|
|
12747
|
+
"type": "array",
|
|
12748
|
+
"maxItems": 100,
|
|
12749
|
+
"items": { "$ref": "#/components/schemas/BillingInvoice" }
|
|
12750
|
+
},
|
|
12751
|
+
"next_cursor": {
|
|
12752
|
+
"type": "string",
|
|
12753
|
+
"minLength": 1,
|
|
12754
|
+
"maxLength": 256,
|
|
12755
|
+
"pattern": "^[A-Za-z0-9_-]+$"
|
|
12756
|
+
},
|
|
12757
|
+
"page": { "$ref": "#/components/schemas/ListPageNumber" },
|
|
12758
|
+
"page_size": { "$ref": "#/components/schemas/ListPageSize" },
|
|
12759
|
+
"total": { "$ref": "#/components/schemas/ListTotal" }
|
|
12760
|
+
},
|
|
12761
|
+
"additionalProperties": false
|
|
12762
|
+
},
|
|
12763
|
+
"UpdateBillingReceiptEmailRequest": {
|
|
12764
|
+
"type": "object",
|
|
12765
|
+
"additionalProperties": false,
|
|
12766
|
+
"required": ["email"],
|
|
12767
|
+
"properties": {
|
|
12768
|
+
"email": {
|
|
12769
|
+
"anyOf": [
|
|
12770
|
+
{ "type": "null" },
|
|
12771
|
+
{ "$ref": "#/components/schemas/EmailAddress" }
|
|
12772
|
+
],
|
|
12773
|
+
"description": "The receipt address, or null."
|
|
12774
|
+
}
|
|
12775
|
+
},
|
|
12776
|
+
"description": "Where receipts and invoices are emailed. Null stops them."
|
|
12699
12777
|
},
|
|
12700
12778
|
"OrganizationProjection": {
|
|
12701
12779
|
"type": "object",
|
|
@@ -17220,6 +17298,18 @@
|
|
|
17220
17298
|
"enum": ["telegram", "slack", "email"],
|
|
17221
17299
|
"description": "A provider-neutral delivery channel. Adding a member makes it representable; it does not claim that every deployment has registered an executable adapter."
|
|
17222
17300
|
},
|
|
17301
|
+
"ListTotal": {
|
|
17302
|
+
"type": "integer",
|
|
17303
|
+
"minimum": 0,
|
|
17304
|
+
"description": "How many records the list holds in total, not only on this page. Counted while the page was read, so a write landing between the count and the page can leave it a record or two out of step with `items`. That is noise on an inspection surface; it never changes which records a page addresses."
|
|
17305
|
+
},
|
|
17306
|
+
"EmailAddress": {
|
|
17307
|
+
"type": "string",
|
|
17308
|
+
"minLength": 3,
|
|
17309
|
+
"maxLength": 254,
|
|
17310
|
+
"pattern": "^(?=[^@]{1,64}@)(?!\\.)(?![^@]*\\.@)(?![^@]*\\.\\.)[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
|
|
17311
|
+
"description": "Exactly one mailbox: an unquoted ASCII dot-atom local part plus a canonical lower-case IDNA domain. The comparison key preserves local-part bytes and case and lower-cases only the domain; dot, plus-tag, alias and provider equivalence are never inferred."
|
|
17312
|
+
},
|
|
17223
17313
|
"OrganizationRole": {
|
|
17224
17314
|
"type": "string",
|
|
17225
17315
|
"enum": ["admin", "member"],
|
|
@@ -17309,11 +17399,6 @@
|
|
|
17309
17399
|
}
|
|
17310
17400
|
]
|
|
17311
17401
|
},
|
|
17312
|
-
"ListTotal": {
|
|
17313
|
-
"type": "integer",
|
|
17314
|
-
"minimum": 0,
|
|
17315
|
-
"description": "How many records the list holds in total, not only on this page. Counted while the page was read, so a write landing between the count and the page can leave it a record or two out of step with `items`. That is noise on an inspection surface; it never changes which records a page addresses."
|
|
17316
|
-
},
|
|
17317
17402
|
"EmailDomainName": {
|
|
17318
17403
|
"type": "string",
|
|
17319
17404
|
"minLength": 4,
|
|
@@ -17591,13 +17676,6 @@
|
|
|
17591
17676
|
"pattern": "^wb_pc1\\.pcred_[A-Za-z0-9_-]{21}[AQgw]\\.[A-Za-z0-9_-]{42}[AEIMQUYcgkosw048]$",
|
|
17592
17677
|
"description": "The exact one-time runtime bearer syntax. The final segment is canonical unpadded base64url for exactly 32 random secret bytes."
|
|
17593
17678
|
},
|
|
17594
|
-
"EmailAddress": {
|
|
17595
|
-
"type": "string",
|
|
17596
|
-
"minLength": 3,
|
|
17597
|
-
"maxLength": 254,
|
|
17598
|
-
"pattern": "^(?=[^@]{1,64}@)(?!\\.)(?![^@]*\\.@)(?![^@]*\\.\\.)[A-Za-z0-9!#$%&'*+/=?^_`{|}~.-]+@(?:[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$",
|
|
17599
|
-
"description": "Exactly one mailbox: an unquoted ASCII dot-atom local part plus a canonical lower-case IDNA domain. The comparison key preserves local-part bytes and case and lower-cases only the domain; dot, plus-tag, alias and provider equivalence are never inferred."
|
|
17600
|
-
},
|
|
17601
17679
|
"ConnectionIdentity": {
|
|
17602
17680
|
"type": "object",
|
|
17603
17681
|
"description": "The identity a subscriber will see, named the way its provider names it. Carries the provider so a reader knows what kind of handle it is holding, rather than inferring it from the field's name. One shape for every provider: what differs between them is the handle's own format, which is stated here as a rule rather than as a separate type per provider.",
|
|
@@ -19092,7 +19170,7 @@
|
|
|
19092
19170
|
"provider-capabilities-v1.schema": {
|
|
19093
19171
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
19094
19172
|
"$id": "https://whooshbang.flowxo.com/schemas/provider-capabilities-v1.schema.json",
|
|
19095
|
-
"x-contract-version": "2.0.0-rc.
|
|
19173
|
+
"x-contract-version": "2.0.0-rc.7",
|
|
19096
19174
|
"title": "ProviderCapabilitiesV1",
|
|
19097
19175
|
"description": "Provider-neutral, renderer-facing delivery and interaction capabilities with explicit degradation.",
|
|
19098
19176
|
"type": "object",
|
|
@@ -19812,5 +19890,5 @@
|
|
|
19812
19890
|
}
|
|
19813
19891
|
}
|
|
19814
19892
|
},
|
|
19815
|
-
"x-contract-version": "2.0.0-rc.
|
|
19893
|
+
"x-contract-version": "2.0.0-rc.7"
|
|
19816
19894
|
}
|