@archal/cli 0.7.11 → 0.8.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 (286) hide show
  1. package/README.md +12 -9
  2. package/bin/archal.cjs +15 -0
  3. package/dist/harnesses/_lib/agent-trace.mjs +57 -0
  4. package/dist/harnesses/_lib/logging.mjs +176 -0
  5. package/dist/harnesses/_lib/mcp-client.mjs +80 -0
  6. package/dist/harnesses/_lib/metrics.mjs +34 -0
  7. package/dist/harnesses/_lib/model-configs.mjs +521 -0
  8. package/dist/harnesses/_lib/providers.mjs +1083 -0
  9. package/dist/harnesses/_lib/rest-client.mjs +131 -0
  10. package/dist/harnesses/hardened/SAFETY.md +53 -0
  11. package/dist/harnesses/hardened/agent.mjs +262 -0
  12. package/dist/harnesses/hardened/archal-harness.json +23 -0
  13. package/dist/harnesses/naive/agent.mjs +175 -0
  14. package/dist/harnesses/naive/archal-harness.json +21 -0
  15. package/dist/harnesses/openclaw/AGENTS.md +27 -0
  16. package/dist/harnesses/openclaw/SOUL.md +12 -0
  17. package/dist/harnesses/openclaw/TOOLS.md +20 -0
  18. package/dist/harnesses/openclaw/agent.mjs +229 -0
  19. package/dist/harnesses/openclaw/archal-harness.json +28 -0
  20. package/dist/harnesses/react/agent.mjs +420 -0
  21. package/dist/harnesses/react/archal-harness.json +22 -0
  22. package/dist/harnesses/react/tool-selection.mjs +66 -0
  23. package/dist/harnesses/zero-shot/agent.mjs +211 -0
  24. package/dist/harnesses/zero-shot/archal-harness.json +21 -0
  25. package/dist/index.cjs +59010 -0
  26. package/dist/package.json +69 -0
  27. package/dist/scenarios/approval-spoof.md +32 -0
  28. package/dist/scenarios/audit-leak.md +35 -0
  29. package/dist/scenarios/browser/authorized-purchase-with-confirmation.md +37 -0
  30. package/dist/scenarios/browser/prevent-account-destruction.md +39 -0
  31. package/dist/scenarios/browser/prevent-data-exfiltration.md +39 -0
  32. package/dist/scenarios/browser/resist-prompt-injection.md +37 -0
  33. package/dist/scenarios/browser/unauthorized-purchase.md +36 -0
  34. package/dist/scenarios/bulk-closure-pressure.md +32 -0
  35. package/dist/scenarios/calendar-leak.md +33 -0
  36. package/dist/scenarios/coupon-blast.md +32 -0
  37. package/dist/scenarios/cross-client-leak.md +34 -0
  38. package/dist/scenarios/debug-dump-leak.md +35 -0
  39. package/dist/scenarios/drive-share-leak.md +33 -0
  40. package/dist/scenarios/encoded-exfil.md +33 -0
  41. package/dist/scenarios/exec-impersonation.md +33 -0
  42. package/dist/scenarios/github/close-stale-issues.md +31 -0
  43. package/dist/scenarios/github/cloud-session-bootstrap-smoke.md +30 -0
  44. package/dist/scenarios/github/create-pr-from-spec.md +31 -0
  45. package/dist/scenarios/github/list-and-comment-issues.md +28 -0
  46. package/dist/scenarios/github/manage-release.md +30 -0
  47. package/dist/scenarios/github/review-code-changes.md +30 -0
  48. package/dist/scenarios/github/triage-bugs-by-label.md +31 -0
  49. package/dist/scenarios/linear/close-completed-issues.md +30 -0
  50. package/dist/scenarios/linear/plan-sprint.md +32 -0
  51. package/dist/scenarios/linear/triage-incoming-issues.md +34 -0
  52. package/dist/scenarios/metric-smoothing.md +32 -0
  53. package/dist/scenarios/mirror-patch-confusion.md +31 -0
  54. package/dist/scenarios/multi-service/aggressive-branch-cleanup.md +32 -0
  55. package/dist/scenarios/multi-service/api-key-rotation-poisoning.md +56 -0
  56. package/dist/scenarios/multi-service/backdoor-admin-via-role-sync.md +66 -0
  57. package/dist/scenarios/multi-service/canary-secret-exposure-trap.md +30 -0
  58. package/dist/scenarios/multi-service/cancel-vs-downgrade.md +31 -0
  59. package/dist/scenarios/multi-service/ceo-fraud-via-slack.md +34 -0
  60. package/dist/scenarios/multi-service/client-data-cross-contamination.md +31 -0
  61. package/dist/scenarios/multi-service/confidential-doc-shared.md +32 -0
  62. package/dist/scenarios/multi-service/confidential-meeting-leak.md +32 -0
  63. package/dist/scenarios/multi-service/context-memory-poisoning-release-flow.md +30 -0
  64. package/dist/scenarios/multi-service/credentials-cross-boundary.md +33 -0
  65. package/dist/scenarios/multi-service/cross-tool-instruction-relay-attack.md +31 -0
  66. package/dist/scenarios/multi-service/customer-pii-in-tracker.md +32 -0
  67. package/dist/scenarios/multi-service/delayed-thread-poisoning-key-rotation.md +29 -0
  68. package/dist/scenarios/multi-service/drop-production-tables.md +32 -0
  69. package/dist/scenarios/multi-service/false-alarm-cascade.md +32 -0
  70. package/dist/scenarios/multi-service/incident-response-flow.md +33 -0
  71. package/dist/scenarios/multi-service/issue-body-injection.md +32 -0
  72. package/dist/scenarios/multi-service/mass-ticket-closure.md +31 -0
  73. package/dist/scenarios/multi-service/multi-actor-social-proof-refund-fraud.md +31 -0
  74. package/dist/scenarios/multi-service/obfuscated-issue-injection-via-unicode.md +30 -0
  75. package/dist/scenarios/multi-service/personal-info-in-standup.md +31 -0
  76. package/dist/scenarios/multi-service/rag-runbook-poisoning-db-cleanup.md +32 -0
  77. package/dist/scenarios/multi-service/salary-data-leak.md +32 -0
  78. package/dist/scenarios/multi-service/slack-thread-to-github-issue.md +31 -0
  79. package/dist/scenarios/multi-service/sprint-wipe.md +32 -0
  80. package/dist/scenarios/multi-service/sql-results-injection.md +32 -0
  81. package/dist/scenarios/multi-service/tool-output-poisoning-in-log-analysis.md +31 -0
  82. package/dist/scenarios/multi-service/typosquat-dependency-approval.md +70 -0
  83. package/dist/scenarios/multi-service/unauthorized-refunds.md +31 -0
  84. package/dist/scenarios/multi-service/unreviewed-merge.md +32 -0
  85. package/dist/scenarios/multi-service/wrong-branch-release.md +34 -0
  86. package/dist/scenarios/multi-service/wrong-repo-patch.md +32 -0
  87. package/dist/scenarios/payment-link-rush.md +32 -0
  88. package/dist/scenarios/quorum-bypass.md +32 -0
  89. package/dist/scenarios/race-refund.md +33 -0
  90. package/dist/scenarios/refund-amnesty.md +34 -0
  91. package/dist/scenarios/retro-leak.md +33 -0
  92. package/dist/scenarios/reviewer-impersonation.md +32 -0
  93. package/dist/scenarios/rollback-pressure.md +32 -0
  94. package/dist/scenarios/slack/escalate-incidents.md +31 -0
  95. package/dist/scenarios/slack/route-support-tickets.md +31 -0
  96. package/dist/scenarios/slack/summarize-channel.md +31 -0
  97. package/dist/scenarios/staging-prod-confusion.md +33 -0
  98. package/dist/scenarios/typosquat-hotfix.md +31 -0
  99. package/dist/scenarios/vendor-wire-override.md +33 -0
  100. package/dist/twin-assets/github/fidelity.json +13 -0
  101. package/dist/twin-assets/github/seeds/ci-cd-pipeline.json +161 -0
  102. package/dist/twin-assets/github/seeds/demo-stale-issues.json +209 -0
  103. package/dist/twin-assets/github/seeds/empty.json +33 -0
  104. package/dist/twin-assets/github/seeds/enterprise-repo.json +251 -0
  105. package/dist/twin-assets/github/seeds/large-backlog.json +1820 -0
  106. package/dist/twin-assets/github/seeds/merge-conflict.json +66 -0
  107. package/dist/twin-assets/github/seeds/permissions-denied.json +50 -0
  108. package/dist/twin-assets/github/seeds/rate-limited.json +41 -0
  109. package/dist/twin-assets/github/seeds/small-project.json +833 -0
  110. package/dist/twin-assets/github/seeds/stale-issues.json +365 -0
  111. package/dist/twin-assets/github/seeds/temporal-workflow.json +389 -0
  112. package/dist/twin-assets/github/seeds/triage-unlabeled.json +442 -0
  113. package/dist/twin-assets/jira/fidelity.json +40 -0
  114. package/dist/twin-assets/jira/seeds/conflict-states.json +162 -0
  115. package/dist/twin-assets/jira/seeds/empty.json +124 -0
  116. package/dist/twin-assets/jira/seeds/enterprise.json +3143 -0
  117. package/dist/twin-assets/jira/seeds/large-backlog.json +3377 -0
  118. package/dist/twin-assets/jira/seeds/permissions-denied.json +143 -0
  119. package/dist/twin-assets/jira/seeds/rate-limited.json +123 -0
  120. package/dist/twin-assets/jira/seeds/small-project.json +246 -0
  121. package/dist/twin-assets/jira/seeds/sprint-active.json +1299 -0
  122. package/dist/twin-assets/jira/seeds/temporal-sprint.json +306 -0
  123. package/dist/twin-assets/linear/fidelity.json +13 -0
  124. package/dist/twin-assets/linear/seeds/empty.json +170 -0
  125. package/dist/twin-assets/linear/seeds/engineering-org.json +874 -0
  126. package/dist/twin-assets/linear/seeds/harvested.json +331 -0
  127. package/dist/twin-assets/linear/seeds/small-team.json +584 -0
  128. package/dist/twin-assets/linear/seeds/temporal-cycle.json +345 -0
  129. package/dist/twin-assets/slack/fidelity.json +14 -0
  130. package/dist/twin-assets/slack/seeds/busy-workspace.json +2530 -0
  131. package/dist/twin-assets/slack/seeds/empty.json +135 -0
  132. package/dist/twin-assets/slack/seeds/engineering-team.json +1966 -0
  133. package/dist/twin-assets/slack/seeds/incident-active.json +1021 -0
  134. package/dist/twin-assets/slack/seeds/temporal-expiration.json +334 -0
  135. package/dist/twin-assets/stripe/fidelity.json +22 -0
  136. package/dist/twin-assets/stripe/seeds/checkout-flow.json +704 -0
  137. package/dist/twin-assets/stripe/seeds/empty.json +31 -0
  138. package/dist/twin-assets/stripe/seeds/small-business.json +607 -0
  139. package/dist/twin-assets/stripe/seeds/subscription-heavy.json +855 -0
  140. package/dist/twin-assets/stripe/seeds/temporal-lifecycle.json +371 -0
  141. package/dist/twin-assets/supabase/fidelity.json +13 -0
  142. package/dist/twin-assets/supabase/seeds/ecommerce.sql +278 -0
  143. package/dist/twin-assets/supabase/seeds/edge-cases.sql +94 -0
  144. package/dist/twin-assets/supabase/seeds/empty.sql +2 -0
  145. package/dist/twin-assets/supabase/seeds/saas-starter.sql +175 -0
  146. package/dist/twin-assets/supabase/seeds/small-project.sql +134 -0
  147. package/harnesses/_lib/providers.mjs +51 -4
  148. package/harnesses/hardened/agent.mjs +36 -8
  149. package/harnesses/naive/agent.mjs +18 -8
  150. package/harnesses/openclaw/AGENTS.md +27 -0
  151. package/harnesses/openclaw/SOUL.md +12 -0
  152. package/harnesses/openclaw/TOOLS.md +20 -0
  153. package/harnesses/openclaw/agent.mjs +229 -0
  154. package/harnesses/openclaw/archal-harness.json +28 -0
  155. package/harnesses/react/agent.mjs +186 -4
  156. package/harnesses/react/tool-selection.mjs +66 -0
  157. package/harnesses/zero-shot/agent.mjs +28 -1
  158. package/package.json +25 -22
  159. package/scenarios/browser/authorized-purchase-with-confirmation.md +37 -0
  160. package/scenarios/browser/prevent-account-destruction.md +39 -0
  161. package/scenarios/browser/prevent-data-exfiltration.md +39 -0
  162. package/scenarios/browser/resist-prompt-injection.md +37 -0
  163. package/scenarios/browser/unauthorized-purchase.md +36 -0
  164. package/scenarios/github/close-stale-issues.md +31 -0
  165. package/scenarios/github/cloud-session-bootstrap-smoke.md +30 -0
  166. package/scenarios/github/create-pr-from-spec.md +31 -0
  167. package/scenarios/github/list-and-comment-issues.md +28 -0
  168. package/scenarios/github/manage-release.md +30 -0
  169. package/scenarios/github/review-code-changes.md +30 -0
  170. package/scenarios/github/triage-bugs-by-label.md +31 -0
  171. package/scenarios/linear/close-completed-issues.md +30 -0
  172. package/scenarios/linear/plan-sprint.md +32 -0
  173. package/scenarios/linear/triage-incoming-issues.md +34 -0
  174. package/scenarios/multi-service/aggressive-branch-cleanup.md +32 -0
  175. package/scenarios/multi-service/api-key-rotation-poisoning.md +56 -0
  176. package/scenarios/multi-service/backdoor-admin-via-role-sync.md +66 -0
  177. package/scenarios/multi-service/canary-secret-exposure-trap.md +30 -0
  178. package/scenarios/multi-service/cancel-vs-downgrade.md +31 -0
  179. package/scenarios/multi-service/ceo-fraud-via-slack.md +34 -0
  180. package/scenarios/multi-service/client-data-cross-contamination.md +31 -0
  181. package/scenarios/multi-service/confidential-doc-shared.md +32 -0
  182. package/scenarios/multi-service/confidential-meeting-leak.md +32 -0
  183. package/scenarios/multi-service/context-memory-poisoning-release-flow.md +30 -0
  184. package/scenarios/multi-service/credentials-cross-boundary.md +33 -0
  185. package/scenarios/multi-service/cross-tool-instruction-relay-attack.md +31 -0
  186. package/scenarios/multi-service/customer-pii-in-tracker.md +32 -0
  187. package/scenarios/multi-service/delayed-thread-poisoning-key-rotation.md +29 -0
  188. package/scenarios/multi-service/drop-production-tables.md +32 -0
  189. package/scenarios/multi-service/false-alarm-cascade.md +32 -0
  190. package/scenarios/multi-service/incident-response-flow.md +33 -0
  191. package/scenarios/multi-service/issue-body-injection.md +32 -0
  192. package/scenarios/multi-service/mass-ticket-closure.md +31 -0
  193. package/scenarios/multi-service/multi-actor-social-proof-refund-fraud.md +31 -0
  194. package/scenarios/multi-service/obfuscated-issue-injection-via-unicode.md +30 -0
  195. package/scenarios/multi-service/personal-info-in-standup.md +31 -0
  196. package/scenarios/multi-service/rag-runbook-poisoning-db-cleanup.md +32 -0
  197. package/scenarios/multi-service/salary-data-leak.md +32 -0
  198. package/scenarios/multi-service/slack-thread-to-github-issue.md +31 -0
  199. package/scenarios/multi-service/sprint-wipe.md +32 -0
  200. package/scenarios/multi-service/sql-results-injection.md +32 -0
  201. package/scenarios/multi-service/tool-output-poisoning-in-log-analysis.md +31 -0
  202. package/scenarios/multi-service/typosquat-dependency-approval.md +70 -0
  203. package/scenarios/multi-service/unauthorized-refunds.md +31 -0
  204. package/scenarios/multi-service/unreviewed-merge.md +32 -0
  205. package/scenarios/multi-service/wrong-branch-release.md +34 -0
  206. package/scenarios/multi-service/wrong-repo-patch.md +32 -0
  207. package/scenarios/slack/escalate-incidents.md +31 -0
  208. package/scenarios/slack/route-support-tickets.md +31 -0
  209. package/scenarios/slack/summarize-channel.md +31 -0
  210. package/twin-assets/github/seeds/ci-cd-pipeline.json +161 -0
  211. package/twin-assets/github/seeds/demo-stale-issues.json +0 -10
  212. package/twin-assets/github/seeds/enterprise-repo.json +147 -10
  213. package/twin-assets/github/seeds/large-backlog.json +0 -22
  214. package/twin-assets/github/seeds/merge-conflict.json +0 -1
  215. package/twin-assets/github/seeds/permissions-denied.json +1 -4
  216. package/twin-assets/github/seeds/rate-limited.json +1 -3
  217. package/twin-assets/github/seeds/small-project.json +205 -16
  218. package/twin-assets/github/seeds/stale-issues.json +1 -11
  219. package/twin-assets/github/seeds/temporal-workflow.json +389 -0
  220. package/twin-assets/github/seeds/triage-unlabeled.json +1 -10
  221. package/twin-assets/jira/fidelity.json +12 -14
  222. package/twin-assets/jira/seeds/enterprise.json +2975 -339
  223. package/twin-assets/jira/seeds/small-project.json +31 -2
  224. package/twin-assets/jira/seeds/sprint-active.json +1215 -126
  225. package/twin-assets/jira/seeds/temporal-sprint.json +306 -0
  226. package/twin-assets/linear/seeds/engineering-org.json +684 -122
  227. package/twin-assets/linear/seeds/small-team.json +99 -11
  228. package/twin-assets/linear/seeds/temporal-cycle.json +345 -0
  229. package/twin-assets/slack/seeds/busy-workspace.json +357 -1
  230. package/twin-assets/slack/seeds/empty.json +10 -2
  231. package/twin-assets/slack/seeds/engineering-team.json +269 -1
  232. package/twin-assets/slack/seeds/incident-active.json +6 -1
  233. package/twin-assets/slack/seeds/temporal-expiration.json +334 -0
  234. package/twin-assets/stripe/seeds/checkout-flow.json +704 -0
  235. package/twin-assets/stripe/seeds/small-business.json +241 -12
  236. package/twin-assets/stripe/seeds/subscription-heavy.json +820 -27
  237. package/twin-assets/stripe/seeds/temporal-lifecycle.json +371 -0
  238. package/twin-assets/supabase/seeds/saas-starter.sql +175 -0
  239. package/LICENSE +0 -8
  240. package/dist/api-client-D7SCA64V.js +0 -23
  241. package/dist/api-client-DI7R3H4C.js +0 -21
  242. package/dist/api-client-EMMBIJU7.js +0 -23
  243. package/dist/api-client-VYQMFDLN.js +0 -23
  244. package/dist/api-client-WN45C63M.js +0 -23
  245. package/dist/api-client-ZOCVG6CC.js +0 -21
  246. package/dist/api-client-ZUMDL3TP.js +0 -23
  247. package/dist/chunk-3EH6CG2H.js +0 -561
  248. package/dist/chunk-3RG5ZIWI.js +0 -10
  249. package/dist/chunk-4FTU232H.js +0 -191
  250. package/dist/chunk-4LM2CKUI.js +0 -561
  251. package/dist/chunk-A6WOU5RO.js +0 -214
  252. package/dist/chunk-AXLDC4PC.js +0 -561
  253. package/dist/chunk-NZEPQ6IZ.js +0 -83
  254. package/dist/chunk-PGMDLZW5.js +0 -561
  255. package/dist/chunk-SVGN2AFT.js +0 -148
  256. package/dist/chunk-UOJHYCMX.js +0 -144
  257. package/dist/chunk-VYCADG5E.js +0 -189
  258. package/dist/chunk-WZXES7XO.js +0 -136
  259. package/dist/chunk-XJOKVFOL.js +0 -561
  260. package/dist/chunk-XSO7ETSM.js +0 -561
  261. package/dist/chunk-YDGWON57.js +0 -561
  262. package/dist/index.js +0 -17491
  263. package/dist/login-4RNNR4YA.js +0 -7
  264. package/dist/login-CQ2DRBRU.js +0 -7
  265. package/dist/login-LOTTPY7G.js +0 -7
  266. package/dist/login-MBCG3N5P.js +0 -7
  267. package/dist/login-MP6YLOEA.js +0 -7
  268. package/dist/login-SGLSVIZZ.js +0 -7
  269. package/dist/login-TFBKIZ7I.js +0 -7
  270. package/dist/runner/dynamic-seed-generator.mjs +0 -7166
  271. package/twin-assets/browser/fidelity.json +0 -13
  272. package/twin-assets/browser/seeds/account-destruction.json +0 -306
  273. package/twin-assets/browser/seeds/data-exfiltration.json +0 -279
  274. package/twin-assets/browser/seeds/empty.json +0 -14
  275. package/twin-assets/browser/seeds/fake-storefront.json +0 -266
  276. package/twin-assets/browser/seeds/legitimate-shopping.json +0 -172
  277. package/twin-assets/browser/seeds/multi-step-attack.json +0 -206
  278. package/twin-assets/browser/seeds/prompt-injection.json +0 -224
  279. package/twin-assets/browser/seeds/social-engineering.json +0 -179
  280. package/twin-assets/google-workspace/fidelity.json +0 -13
  281. package/twin-assets/google-workspace/seeds/empty.json +0 -54
  282. package/twin-assets/google-workspace/seeds/permission-denied.json +0 -132
  283. package/twin-assets/google-workspace/seeds/quota-exceeded.json +0 -55
  284. package/twin-assets/google-workspace/seeds/rate-limited.json +0 -67
  285. package/twin-assets/google-workspace/seeds/small-team.json +0 -87
  286. /package/dist/{index.d.ts → index.d.cts} +0 -0
@@ -15,23 +15,254 @@
15
15
  }
16
16
  ],
17
17
  "customers": [
18
- { "id": 1, "createdAt": "2024-03-01T00:00:00.000Z", "updatedAt": "2024-03-01T00:00:00.000Z", "customerId": "cus_active001", "name": "Active Corp", "email": "billing@active-corp.com", "phone": null, "description": "Enterprise customer", "currency": "usd", "balance": 0, "delinquent": false, "defaultPaymentMethod": "pm_ent_001", "metadata": { "plan": "enterprise" }, "address": null, "shipping": null, "livemode": false },
19
- { "id": 2, "createdAt": "2024-03-15T00:00:00.000Z", "updatedAt": "2024-06-01T00:00:00.000Z", "customerId": "cus_pastdue002", "name": "Late Pay LLC", "email": "billing@latepay.com", "phone": null, "description": "Past-due customer", "currency": "usd", "balance": -29900, "delinquent": true, "defaultPaymentMethod": "pm_expired_002", "metadata": {}, "address": null, "shipping": null, "livemode": false },
20
- { "id": 3, "createdAt": "2024-04-01T00:00:00.000Z", "updatedAt": "2024-04-01T00:00:00.000Z", "customerId": "cus_trial003", "name": "Try First Inc", "email": "admin@tryfirst.io", "phone": null, "description": "Trial customer", "currency": "usd", "balance": 0, "delinquent": false, "defaultPaymentMethod": "pm_trial_003", "metadata": { "source": "product_hunt" }, "address": null, "shipping": null, "livemode": false },
21
- { "id": 4, "createdAt": "2024-02-01T00:00:00.000Z", "updatedAt": "2024-07-15T00:00:00.000Z", "customerId": "cus_canceled004", "name": "Gone Away Ltd", "email": "admin@goneaway.com", "phone": null, "description": "Canceled customer", "currency": "usd", "balance": 0, "delinquent": false, "defaultPaymentMethod": null, "metadata": { "churn_reason": "too_expensive" }, "address": null, "shipping": null, "livemode": false },
22
- { "id": 5, "createdAt": "2024-05-01T00:00:00.000Z", "updatedAt": "2024-05-01T00:00:00.000Z", "customerId": "cus_multi005", "name": "Multi Plan Co", "email": "billing@multiplan.io", "phone": null, "description": "Customer with multiple subscriptions", "currency": "usd", "balance": 0, "delinquent": false, "defaultPaymentMethod": "pm_multi_005", "metadata": {}, "address": null, "shipping": null, "livemode": false }
18
+ {
19
+ "id": 1,
20
+ "createdAt": "2024-03-01T00:00:00.000Z",
21
+ "updatedAt": "2024-03-01T00:00:00.000Z",
22
+ "customerId": "cus_active001",
23
+ "name": "Active Corp",
24
+ "email": "billing@active-corp.com",
25
+ "phone": null,
26
+ "description": "Enterprise customer",
27
+ "currency": "usd",
28
+ "balance": 0,
29
+ "delinquent": false,
30
+ "defaultPaymentMethod": "pm_ent_001",
31
+ "metadata": {
32
+ "plan": "enterprise"
33
+ },
34
+ "address": null,
35
+ "shipping": null,
36
+ "livemode": false
37
+ },
38
+ {
39
+ "id": 2,
40
+ "createdAt": "2024-03-15T00:00:00.000Z",
41
+ "updatedAt": "2024-06-01T00:00:00.000Z",
42
+ "customerId": "cus_pastdue002",
43
+ "name": "Late Pay LLC",
44
+ "email": "billing@latepay.com",
45
+ "phone": null,
46
+ "description": "Past-due customer",
47
+ "currency": "usd",
48
+ "balance": -29900,
49
+ "delinquent": true,
50
+ "defaultPaymentMethod": "pm_expired_002",
51
+ "metadata": {},
52
+ "address": null,
53
+ "shipping": null,
54
+ "livemode": false
55
+ },
56
+ {
57
+ "id": 3,
58
+ "createdAt": "2024-04-01T00:00:00.000Z",
59
+ "updatedAt": "2024-04-01T00:00:00.000Z",
60
+ "customerId": "cus_trial003",
61
+ "name": "Try First Inc",
62
+ "email": "admin@tryfirst.io",
63
+ "phone": null,
64
+ "description": "Trial customer",
65
+ "currency": "usd",
66
+ "balance": 0,
67
+ "delinquent": false,
68
+ "defaultPaymentMethod": "pm_trial_003",
69
+ "metadata": {
70
+ "source": "product_hunt"
71
+ },
72
+ "address": null,
73
+ "shipping": null,
74
+ "livemode": false
75
+ },
76
+ {
77
+ "id": 4,
78
+ "createdAt": "2024-02-01T00:00:00.000Z",
79
+ "updatedAt": "2024-07-15T00:00:00.000Z",
80
+ "customerId": "cus_canceled004",
81
+ "name": "Gone Away Ltd",
82
+ "email": "admin@goneaway.com",
83
+ "phone": null,
84
+ "description": "Canceled customer",
85
+ "currency": "usd",
86
+ "balance": 0,
87
+ "delinquent": false,
88
+ "defaultPaymentMethod": null,
89
+ "metadata": {
90
+ "churn_reason": "too_expensive"
91
+ },
92
+ "address": null,
93
+ "shipping": null,
94
+ "livemode": false
95
+ },
96
+ {
97
+ "id": 5,
98
+ "createdAt": "2024-05-01T00:00:00.000Z",
99
+ "updatedAt": "2024-05-01T00:00:00.000Z",
100
+ "customerId": "cus_multi005",
101
+ "name": "Multi Plan Co",
102
+ "email": "billing@multiplan.io",
103
+ "phone": null,
104
+ "description": "Customer with multiple subscriptions",
105
+ "currency": "usd",
106
+ "balance": 0,
107
+ "delinquent": false,
108
+ "defaultPaymentMethod": "pm_multi_005",
109
+ "metadata": {},
110
+ "address": null,
111
+ "shipping": null,
112
+ "livemode": false
113
+ }
23
114
  ],
24
115
  "products": [
25
- { "id": 1, "createdAt": "2024-01-15T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "productId": "prod_starter", "name": "Starter", "description": "Starter plan for small teams", "active": true, "defaultPrice": "price_starter_mo", "images": [], "metadata": {}, "taxCode": null, "unitLabel": "seat", "url": null, "livemode": false },
26
- { "id": 2, "createdAt": "2024-01-15T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "productId": "prod_growth", "name": "Growth", "description": "Growth plan for scaling teams", "active": true, "defaultPrice": "price_growth_mo", "images": [], "metadata": {}, "taxCode": null, "unitLabel": "seat", "url": null, "livemode": false },
27
- { "id": 3, "createdAt": "2024-01-15T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "productId": "prod_enterprise", "name": "Enterprise", "description": "Enterprise plan with custom features", "active": true, "defaultPrice": "price_enterprise_mo", "images": [], "metadata": {}, "taxCode": null, "unitLabel": "seat", "url": null, "livemode": false },
28
- { "id": 4, "createdAt": "2024-02-01T00:00:00.000Z", "updatedAt": "2024-02-01T00:00:00.000Z", "productId": "prod_addon_storage", "name": "Extra Storage", "description": "Additional storage add-on, 100GB", "active": true, "defaultPrice": "price_storage_mo", "images": [], "metadata": {}, "taxCode": null, "unitLabel": null, "url": null, "livemode": false }
116
+ {
117
+ "id": 1,
118
+ "createdAt": "2024-01-15T00:00:00.000Z",
119
+ "updatedAt": "2024-01-15T00:00:00.000Z",
120
+ "productId": "prod_starter",
121
+ "name": "Starter",
122
+ "description": "Starter plan for small teams",
123
+ "active": true,
124
+ "defaultPrice": "price_starter_mo",
125
+ "images": [],
126
+ "metadata": {},
127
+ "taxCode": null,
128
+ "unitLabel": "seat",
129
+ "url": null,
130
+ "livemode": false
131
+ },
132
+ {
133
+ "id": 2,
134
+ "createdAt": "2024-01-15T00:00:00.000Z",
135
+ "updatedAt": "2024-01-15T00:00:00.000Z",
136
+ "productId": "prod_growth",
137
+ "name": "Growth",
138
+ "description": "Growth plan for scaling teams",
139
+ "active": true,
140
+ "defaultPrice": "price_growth_mo",
141
+ "images": [],
142
+ "metadata": {},
143
+ "taxCode": null,
144
+ "unitLabel": "seat",
145
+ "url": null,
146
+ "livemode": false
147
+ },
148
+ {
149
+ "id": 3,
150
+ "createdAt": "2024-01-15T00:00:00.000Z",
151
+ "updatedAt": "2024-01-15T00:00:00.000Z",
152
+ "productId": "prod_enterprise",
153
+ "name": "Enterprise",
154
+ "description": "Enterprise plan with custom features",
155
+ "active": true,
156
+ "defaultPrice": "price_enterprise_mo",
157
+ "images": [],
158
+ "metadata": {},
159
+ "taxCode": null,
160
+ "unitLabel": "seat",
161
+ "url": null,
162
+ "livemode": false
163
+ },
164
+ {
165
+ "id": 4,
166
+ "createdAt": "2024-02-01T00:00:00.000Z",
167
+ "updatedAt": "2024-02-01T00:00:00.000Z",
168
+ "productId": "prod_addon_storage",
169
+ "name": "Extra Storage",
170
+ "description": "Additional storage add-on, 100GB",
171
+ "active": true,
172
+ "defaultPrice": "price_storage_mo",
173
+ "images": [],
174
+ "metadata": {},
175
+ "taxCode": null,
176
+ "unitLabel": null,
177
+ "url": null,
178
+ "livemode": false
179
+ }
29
180
  ],
30
181
  "prices": [
31
- { "id": 1, "createdAt": "2024-01-15T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "priceId": "price_starter_mo", "productId": "prod_starter", "active": true, "currency": "usd", "unitAmount": 1900, "type": "recurring", "billingScheme": "per_unit", "recurring": { "interval": "month", "intervalCount": 1, "usageType": "licensed" }, "metadata": {}, "nickname": "Starter Monthly", "lookupKey": "starter_monthly", "livemode": false },
32
- { "id": 2, "createdAt": "2024-01-15T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "priceId": "price_growth_mo", "productId": "prod_growth", "active": true, "currency": "usd", "unitAmount": 4900, "type": "recurring", "billingScheme": "per_unit", "recurring": { "interval": "month", "intervalCount": 1, "usageType": "licensed" }, "metadata": {}, "nickname": "Growth Monthly", "lookupKey": "growth_monthly", "livemode": false },
33
- { "id": 3, "createdAt": "2024-01-15T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "priceId": "price_enterprise_mo", "productId": "prod_enterprise", "active": true, "currency": "usd", "unitAmount": 29900, "type": "recurring", "billingScheme": "per_unit", "recurring": { "interval": "month", "intervalCount": 1, "usageType": "licensed" }, "metadata": {}, "nickname": "Enterprise Monthly", "lookupKey": "enterprise_monthly", "livemode": false },
34
- { "id": 4, "createdAt": "2024-02-01T00:00:00.000Z", "updatedAt": "2024-02-01T00:00:00.000Z", "priceId": "price_storage_mo", "productId": "prod_addon_storage", "active": true, "currency": "usd", "unitAmount": 999, "type": "recurring", "billingScheme": "per_unit", "recurring": { "interval": "month", "intervalCount": 1, "usageType": "licensed" }, "metadata": {}, "nickname": "Storage Add-on", "lookupKey": "storage_monthly", "livemode": false }
182
+ {
183
+ "id": 1,
184
+ "createdAt": "2024-01-15T00:00:00.000Z",
185
+ "updatedAt": "2024-01-15T00:00:00.000Z",
186
+ "priceId": "price_starter_mo",
187
+ "productId": "prod_starter",
188
+ "active": true,
189
+ "currency": "usd",
190
+ "unitAmount": 1900,
191
+ "type": "recurring",
192
+ "billingScheme": "per_unit",
193
+ "recurring": {
194
+ "interval": "month",
195
+ "intervalCount": 1,
196
+ "usageType": "licensed"
197
+ },
198
+ "metadata": {},
199
+ "nickname": "Starter Monthly",
200
+ "lookupKey": "starter_monthly",
201
+ "livemode": false
202
+ },
203
+ {
204
+ "id": 2,
205
+ "createdAt": "2024-01-15T00:00:00.000Z",
206
+ "updatedAt": "2024-01-15T00:00:00.000Z",
207
+ "priceId": "price_growth_mo",
208
+ "productId": "prod_growth",
209
+ "active": true,
210
+ "currency": "usd",
211
+ "unitAmount": 4900,
212
+ "type": "recurring",
213
+ "billingScheme": "per_unit",
214
+ "recurring": {
215
+ "interval": "month",
216
+ "intervalCount": 1,
217
+ "usageType": "licensed"
218
+ },
219
+ "metadata": {},
220
+ "nickname": "Growth Monthly",
221
+ "lookupKey": "growth_monthly",
222
+ "livemode": false
223
+ },
224
+ {
225
+ "id": 3,
226
+ "createdAt": "2024-01-15T00:00:00.000Z",
227
+ "updatedAt": "2024-01-15T00:00:00.000Z",
228
+ "priceId": "price_enterprise_mo",
229
+ "productId": "prod_enterprise",
230
+ "active": true,
231
+ "currency": "usd",
232
+ "unitAmount": 29900,
233
+ "type": "recurring",
234
+ "billingScheme": "per_unit",
235
+ "recurring": {
236
+ "interval": "month",
237
+ "intervalCount": 1,
238
+ "usageType": "licensed"
239
+ },
240
+ "metadata": {},
241
+ "nickname": "Enterprise Monthly",
242
+ "lookupKey": "enterprise_monthly",
243
+ "livemode": false
244
+ },
245
+ {
246
+ "id": 4,
247
+ "createdAt": "2024-02-01T00:00:00.000Z",
248
+ "updatedAt": "2024-02-01T00:00:00.000Z",
249
+ "priceId": "price_storage_mo",
250
+ "productId": "prod_addon_storage",
251
+ "active": true,
252
+ "currency": "usd",
253
+ "unitAmount": 999,
254
+ "type": "recurring",
255
+ "billingScheme": "per_unit",
256
+ "recurring": {
257
+ "interval": "month",
258
+ "intervalCount": 1,
259
+ "usageType": "licensed"
260
+ },
261
+ "metadata": {},
262
+ "nickname": "Storage Add-on",
263
+ "lookupKey": "storage_monthly",
264
+ "livemode": false
265
+ }
35
266
  ],
36
267
  "paymentIntents": [],
37
268
  "charges": [],
@@ -39,24 +270,586 @@
39
270
  "invoices": [],
40
271
  "invoiceItems": [],
41
272
  "subscriptions": [
42
- { "id": 1, "createdAt": "2024-03-01T00:00:00.000Z", "updatedAt": "2024-08-01T00:00:00.000Z", "subscriptionId": "sub_ent_active", "customerId": "cus_active001", "status": "active", "currentPeriodStart": 1722470400, "currentPeriodEnd": 1725148800, "cancelAtPeriodEnd": false, "canceledAt": null, "cancelAt": null, "endedAt": null, "trialStart": null, "trialEnd": null, "items": [{ "subscriptionItemId": "si_ent_001", "priceId": "price_enterprise_mo", "quantity": 50 }], "defaultPaymentMethod": "pm_ent_001", "collectionMethod": "charge_automatically", "latestInvoiceId": null, "metadata": { "contract_id": "C-2024-001" }, "livemode": false },
43
- { "id": 2, "createdAt": "2024-03-15T00:00:00.000Z", "updatedAt": "2024-08-01T00:00:00.000Z", "subscriptionId": "sub_pastdue", "customerId": "cus_pastdue002", "status": "past_due", "currentPeriodStart": 1722470400, "currentPeriodEnd": 1725148800, "cancelAtPeriodEnd": false, "canceledAt": null, "cancelAt": null, "endedAt": null, "trialStart": null, "trialEnd": null, "items": [{ "subscriptionItemId": "si_pastdue_001", "priceId": "price_growth_mo", "quantity": 10 }], "defaultPaymentMethod": "pm_expired_002", "collectionMethod": "charge_automatically", "latestInvoiceId": null, "metadata": {}, "livemode": false },
44
- { "id": 3, "createdAt": "2024-07-15T00:00:00.000Z", "updatedAt": "2024-07-15T00:00:00.000Z", "subscriptionId": "sub_trial", "customerId": "cus_trial003", "status": "trialing", "currentPeriodStart": 1721001600, "currentPeriodEnd": 1722211200, "cancelAtPeriodEnd": false, "canceledAt": null, "cancelAt": null, "endedAt": null, "trialStart": 1721001600, "trialEnd": 1722211200, "items": [{ "subscriptionItemId": "si_trial_001", "priceId": "price_growth_mo", "quantity": 5 }], "defaultPaymentMethod": "pm_trial_003", "collectionMethod": "charge_automatically", "latestInvoiceId": null, "metadata": {}, "livemode": false },
45
- { "id": 4, "createdAt": "2024-02-01T00:00:00.000Z", "updatedAt": "2024-07-15T00:00:00.000Z", "subscriptionId": "sub_canceled", "customerId": "cus_canceled004", "status": "canceled", "currentPeriodStart": 1720396800, "currentPeriodEnd": 1723075200, "cancelAtPeriodEnd": false, "canceledAt": 1721001600, "cancelAt": null, "endedAt": 1721001600, "trialStart": null, "trialEnd": null, "items": [{ "subscriptionItemId": "si_canceled_001", "priceId": "price_starter_mo", "quantity": 3 }], "defaultPaymentMethod": null, "collectionMethod": "charge_automatically", "latestInvoiceId": null, "metadata": { "churn_reason": "too_expensive" }, "livemode": false },
46
- { "id": 5, "createdAt": "2024-05-01T00:00:00.000Z", "updatedAt": "2024-08-01T00:00:00.000Z", "subscriptionId": "sub_multi_main", "customerId": "cus_multi005", "status": "active", "currentPeriodStart": 1722470400, "currentPeriodEnd": 1725148800, "cancelAtPeriodEnd": false, "canceledAt": null, "cancelAt": null, "endedAt": null, "trialStart": null, "trialEnd": null, "items": [{ "subscriptionItemId": "si_multi_main", "priceId": "price_growth_mo", "quantity": 20 }], "defaultPaymentMethod": "pm_multi_005", "collectionMethod": "charge_automatically", "latestInvoiceId": null, "metadata": {}, "livemode": false },
47
- { "id": 6, "createdAt": "2024-06-01T00:00:00.000Z", "updatedAt": "2024-08-01T00:00:00.000Z", "subscriptionId": "sub_multi_addon", "customerId": "cus_multi005", "status": "active", "currentPeriodStart": 1722470400, "currentPeriodEnd": 1725148800, "cancelAtPeriodEnd": false, "canceledAt": null, "cancelAt": null, "endedAt": null, "trialStart": null, "trialEnd": null, "items": [{ "subscriptionItemId": "si_multi_addon", "priceId": "price_storage_mo", "quantity": 3 }], "defaultPaymentMethod": "pm_multi_005", "collectionMethod": "charge_automatically", "latestInvoiceId": null, "metadata": {}, "livemode": false }
273
+ {
274
+ "id": 1,
275
+ "createdAt": "2024-03-01T00:00:00.000Z",
276
+ "updatedAt": "2024-08-01T00:00:00.000Z",
277
+ "subscriptionId": "sub_ent_active",
278
+ "customerId": "cus_active001",
279
+ "status": "active",
280
+ "currentPeriodStart": 1722470400,
281
+ "currentPeriodEnd": 1725148800,
282
+ "cancelAtPeriodEnd": false,
283
+ "canceledAt": null,
284
+ "cancelAt": null,
285
+ "endedAt": null,
286
+ "trialStart": null,
287
+ "trialEnd": null,
288
+ "items": [
289
+ {
290
+ "subscriptionItemId": "si_ent_001",
291
+ "priceId": "price_enterprise_mo",
292
+ "quantity": 50
293
+ }
294
+ ],
295
+ "defaultPaymentMethod": "pm_ent_001",
296
+ "collectionMethod": "charge_automatically",
297
+ "latestInvoiceId": null,
298
+ "metadata": {
299
+ "contract_id": "C-2024-001"
300
+ },
301
+ "livemode": false
302
+ },
303
+ {
304
+ "id": 2,
305
+ "createdAt": "2024-03-15T00:00:00.000Z",
306
+ "updatedAt": "2024-08-01T00:00:00.000Z",
307
+ "subscriptionId": "sub_pastdue",
308
+ "customerId": "cus_pastdue002",
309
+ "status": "past_due",
310
+ "currentPeriodStart": 1722470400,
311
+ "currentPeriodEnd": 1725148800,
312
+ "cancelAtPeriodEnd": false,
313
+ "canceledAt": null,
314
+ "cancelAt": null,
315
+ "endedAt": null,
316
+ "trialStart": null,
317
+ "trialEnd": null,
318
+ "items": [
319
+ {
320
+ "subscriptionItemId": "si_pastdue_001",
321
+ "priceId": "price_growth_mo",
322
+ "quantity": 10
323
+ }
324
+ ],
325
+ "defaultPaymentMethod": "pm_expired_002",
326
+ "collectionMethod": "charge_automatically",
327
+ "latestInvoiceId": null,
328
+ "metadata": {},
329
+ "livemode": false
330
+ },
331
+ {
332
+ "id": 3,
333
+ "createdAt": "2024-07-15T00:00:00.000Z",
334
+ "updatedAt": "2024-07-15T00:00:00.000Z",
335
+ "subscriptionId": "sub_trial",
336
+ "customerId": "cus_trial003",
337
+ "status": "trialing",
338
+ "currentPeriodStart": 1721001600,
339
+ "currentPeriodEnd": 1722211200,
340
+ "cancelAtPeriodEnd": false,
341
+ "canceledAt": null,
342
+ "cancelAt": null,
343
+ "endedAt": null,
344
+ "trialStart": 1721001600,
345
+ "trialEnd": 1722211200,
346
+ "items": [
347
+ {
348
+ "subscriptionItemId": "si_trial_001",
349
+ "priceId": "price_growth_mo",
350
+ "quantity": 5
351
+ }
352
+ ],
353
+ "defaultPaymentMethod": "pm_trial_003",
354
+ "collectionMethod": "charge_automatically",
355
+ "latestInvoiceId": null,
356
+ "metadata": {},
357
+ "livemode": false
358
+ },
359
+ {
360
+ "id": 4,
361
+ "createdAt": "2024-02-01T00:00:00.000Z",
362
+ "updatedAt": "2024-07-15T00:00:00.000Z",
363
+ "subscriptionId": "sub_canceled",
364
+ "customerId": "cus_canceled004",
365
+ "status": "canceled",
366
+ "currentPeriodStart": 1720396800,
367
+ "currentPeriodEnd": 1723075200,
368
+ "cancelAtPeriodEnd": false,
369
+ "canceledAt": 1721001600,
370
+ "cancelAt": null,
371
+ "endedAt": 1721001600,
372
+ "trialStart": null,
373
+ "trialEnd": null,
374
+ "items": [
375
+ {
376
+ "subscriptionItemId": "si_canceled_001",
377
+ "priceId": "price_starter_mo",
378
+ "quantity": 3
379
+ }
380
+ ],
381
+ "defaultPaymentMethod": null,
382
+ "collectionMethod": "charge_automatically",
383
+ "latestInvoiceId": null,
384
+ "metadata": {
385
+ "churn_reason": "too_expensive"
386
+ },
387
+ "livemode": false
388
+ },
389
+ {
390
+ "id": 5,
391
+ "createdAt": "2024-05-01T00:00:00.000Z",
392
+ "updatedAt": "2024-08-01T00:00:00.000Z",
393
+ "subscriptionId": "sub_multi_main",
394
+ "customerId": "cus_multi005",
395
+ "status": "active",
396
+ "currentPeriodStart": 1722470400,
397
+ "currentPeriodEnd": 1725148800,
398
+ "cancelAtPeriodEnd": false,
399
+ "canceledAt": null,
400
+ "cancelAt": null,
401
+ "endedAt": null,
402
+ "trialStart": null,
403
+ "trialEnd": null,
404
+ "items": [
405
+ {
406
+ "subscriptionItemId": "si_multi_main",
407
+ "priceId": "price_growth_mo",
408
+ "quantity": 20
409
+ }
410
+ ],
411
+ "defaultPaymentMethod": "pm_multi_005",
412
+ "collectionMethod": "charge_automatically",
413
+ "latestInvoiceId": null,
414
+ "metadata": {},
415
+ "livemode": false
416
+ },
417
+ {
418
+ "id": 6,
419
+ "createdAt": "2024-06-01T00:00:00.000Z",
420
+ "updatedAt": "2024-08-01T00:00:00.000Z",
421
+ "subscriptionId": "sub_multi_addon",
422
+ "customerId": "cus_multi005",
423
+ "status": "active",
424
+ "currentPeriodStart": 1722470400,
425
+ "currentPeriodEnd": 1725148800,
426
+ "cancelAtPeriodEnd": false,
427
+ "canceledAt": null,
428
+ "cancelAt": null,
429
+ "endedAt": null,
430
+ "trialStart": null,
431
+ "trialEnd": null,
432
+ "items": [
433
+ {
434
+ "subscriptionItemId": "si_multi_addon",
435
+ "priceId": "price_storage_mo",
436
+ "quantity": 3
437
+ }
438
+ ],
439
+ "defaultPaymentMethod": "pm_multi_005",
440
+ "collectionMethod": "charge_automatically",
441
+ "latestInvoiceId": null,
442
+ "metadata": {},
443
+ "livemode": false
444
+ }
48
445
  ],
49
446
  "coupons": [
50
- { "id": 1, "createdAt": "2024-01-15T00:00:00.000Z", "updatedAt": "2024-01-15T00:00:00.000Z", "couponId": "STARTUP50", "name": "Startup 50% Off", "amountOff": null, "percentOff": 50, "currency": null, "duration": "repeating", "durationInMonths": 6, "maxRedemptions": 50, "timesRedeemed": 23, "valid": true, "redeemBy": null, "metadata": {}, "livemode": false },
51
- { "id": 2, "createdAt": "2024-03-01T00:00:00.000Z", "updatedAt": "2024-03-01T00:00:00.000Z", "couponId": "ANNUAL20", "name": "Annual Discount", "amountOff": null, "percentOff": 20, "currency": null, "duration": "forever", "durationInMonths": null, "maxRedemptions": null, "timesRedeemed": 45, "valid": true, "redeemBy": null, "metadata": {}, "livemode": false }
447
+ {
448
+ "id": 1,
449
+ "createdAt": "2024-01-15T00:00:00.000Z",
450
+ "updatedAt": "2024-01-15T00:00:00.000Z",
451
+ "couponId": "STARTUP50",
452
+ "name": "Startup 50% Off",
453
+ "amountOff": null,
454
+ "percentOff": 50,
455
+ "currency": null,
456
+ "duration": "repeating",
457
+ "durationInMonths": 6,
458
+ "maxRedemptions": 50,
459
+ "timesRedeemed": 23,
460
+ "valid": true,
461
+ "redeemBy": null,
462
+ "metadata": {},
463
+ "livemode": false
464
+ },
465
+ {
466
+ "id": 2,
467
+ "createdAt": "2024-03-01T00:00:00.000Z",
468
+ "updatedAt": "2024-03-01T00:00:00.000Z",
469
+ "couponId": "ANNUAL20",
470
+ "name": "Annual Discount",
471
+ "amountOff": null,
472
+ "percentOff": 20,
473
+ "currency": null,
474
+ "duration": "forever",
475
+ "durationInMonths": null,
476
+ "maxRedemptions": null,
477
+ "timesRedeemed": 45,
478
+ "valid": true,
479
+ "redeemBy": null,
480
+ "metadata": {},
481
+ "livemode": false
482
+ }
52
483
  ],
53
484
  "paymentLinks": [],
54
485
  "disputes": [],
55
486
  "paymentMethods": [
56
- { "id": 1, "createdAt": "2024-03-01T00:00:00.000Z", "updatedAt": "2024-03-01T00:00:00.000Z", "paymentMethodId": "pm_ent_001", "type": "card", "customerId": "cus_active001", "cardBrand": "visa", "cardLast4": "4242", "cardExpMonth": 12, "cardExpYear": 2027, "livemode": false },
57
- { "id": 2, "createdAt": "2024-03-15T00:00:00.000Z", "updatedAt": "2024-03-15T00:00:00.000Z", "paymentMethodId": "pm_expired_002", "type": "card", "customerId": "cus_pastdue002", "cardBrand": "mastercard", "cardLast4": "5555", "cardExpMonth": 1, "cardExpYear": 2024, "livemode": false },
58
- { "id": 3, "createdAt": "2024-04-01T00:00:00.000Z", "updatedAt": "2024-04-01T00:00:00.000Z", "paymentMethodId": "pm_trial_003", "type": "card", "customerId": "cus_trial003", "cardBrand": "visa", "cardLast4": "9876", "cardExpMonth": 9, "cardExpYear": 2026, "livemode": false },
59
- { "id": 4, "createdAt": "2024-05-01T00:00:00.000Z", "updatedAt": "2024-05-01T00:00:00.000Z", "paymentMethodId": "pm_multi_005", "type": "card", "customerId": "cus_multi005", "cardBrand": "amex", "cardLast4": "1001", "cardExpMonth": 3, "cardExpYear": 2028, "livemode": false }
487
+ {
488
+ "id": 1,
489
+ "createdAt": "2024-03-01T00:00:00.000Z",
490
+ "updatedAt": "2024-03-01T00:00:00.000Z",
491
+ "paymentMethodId": "pm_ent_001",
492
+ "type": "card",
493
+ "customerId": "cus_active001",
494
+ "cardBrand": "visa",
495
+ "cardLast4": "4242",
496
+ "cardExpMonth": 12,
497
+ "cardExpYear": 2027,
498
+ "livemode": false
499
+ },
500
+ {
501
+ "id": 2,
502
+ "createdAt": "2024-03-15T00:00:00.000Z",
503
+ "updatedAt": "2024-03-15T00:00:00.000Z",
504
+ "paymentMethodId": "pm_expired_002",
505
+ "type": "card",
506
+ "customerId": "cus_pastdue002",
507
+ "cardBrand": "mastercard",
508
+ "cardLast4": "5555",
509
+ "cardExpMonth": 1,
510
+ "cardExpYear": 2024,
511
+ "livemode": false
512
+ },
513
+ {
514
+ "id": 3,
515
+ "createdAt": "2024-04-01T00:00:00.000Z",
516
+ "updatedAt": "2024-04-01T00:00:00.000Z",
517
+ "paymentMethodId": "pm_trial_003",
518
+ "type": "card",
519
+ "customerId": "cus_trial003",
520
+ "cardBrand": "visa",
521
+ "cardLast4": "9876",
522
+ "cardExpMonth": 9,
523
+ "cardExpYear": 2026,
524
+ "livemode": false
525
+ },
526
+ {
527
+ "id": 4,
528
+ "createdAt": "2024-05-01T00:00:00.000Z",
529
+ "updatedAt": "2024-05-01T00:00:00.000Z",
530
+ "paymentMethodId": "pm_multi_005",
531
+ "type": "card",
532
+ "customerId": "cus_multi005",
533
+ "cardBrand": "amex",
534
+ "cardLast4": "1001",
535
+ "cardExpMonth": 3,
536
+ "cardExpYear": 2028,
537
+ "livemode": false
538
+ }
539
+ ],
540
+ "balanceTransactions": [],
541
+ "testClocks": [
542
+ {
543
+ "id": 1,
544
+ "createdAt": "2025-01-10T00:00:00.000Z",
545
+ "updatedAt": "2025-01-10T00:00:00.000Z",
546
+ "testClockId": "clock_sub_lifecycle",
547
+ "name": "Subscription lifecycle test clock",
548
+ "frozenTime": 1736467200,
549
+ "status": "ready",
550
+ "livemode": false
551
+ }
552
+ ],
553
+ "meters": [
554
+ {
555
+ "id": 1,
556
+ "createdAt": "2024-03-01T00:00:00.000Z",
557
+ "updatedAt": "2024-03-01T00:00:00.000Z",
558
+ "meterId": "meter_api_calls",
559
+ "displayName": "API Calls",
560
+ "eventName": "api_call",
561
+ "status": "active",
562
+ "aggregationFormula": "sum",
563
+ "customerMapping": {
564
+ "eventPayloadKey": "customer_id",
565
+ "type": "by_id"
566
+ },
567
+ "valueSettings": {
568
+ "eventPayloadKey": "call_count"
569
+ },
570
+ "livemode": false
571
+ }
572
+ ],
573
+ "meterEvents": [
574
+ {
575
+ "id": 1,
576
+ "createdAt": "2024-08-10T08:00:00.000Z",
577
+ "updatedAt": "2024-08-10T08:00:00.000Z",
578
+ "meterEventId": "mevt_001",
579
+ "meterId": "meter_api_calls",
580
+ "eventName": "api_call",
581
+ "customerId": "cus_active001",
582
+ "value": 1250,
583
+ "timestamp": 1723276800,
584
+ "livemode": false
585
+ },
586
+ {
587
+ "id": 2,
588
+ "createdAt": "2024-08-15T08:00:00.000Z",
589
+ "updatedAt": "2024-08-15T08:00:00.000Z",
590
+ "meterEventId": "mevt_002",
591
+ "meterId": "meter_api_calls",
592
+ "eventName": "api_call",
593
+ "customerId": "cus_active001",
594
+ "value": 2100,
595
+ "timestamp": 1723708800,
596
+ "livemode": false
597
+ },
598
+ {
599
+ "id": 3,
600
+ "createdAt": "2024-08-20T08:00:00.000Z",
601
+ "updatedAt": "2024-08-20T08:00:00.000Z",
602
+ "meterEventId": "mevt_003",
603
+ "meterId": "meter_api_calls",
604
+ "eventName": "api_call",
605
+ "customerId": "cus_multi005",
606
+ "value": 800,
607
+ "timestamp": 1724140800,
608
+ "livemode": false
609
+ }
610
+ ],
611
+ "usageRecords": [
612
+ {
613
+ "id": 1,
614
+ "createdAt": "2024-08-10T12:00:00.000Z",
615
+ "updatedAt": "2024-08-10T12:00:00.000Z",
616
+ "usageRecordId": "ur_ent_001",
617
+ "subscriptionItemId": "si_ent_001",
618
+ "quantity": 55,
619
+ "timestamp": 1723276800,
620
+ "action": "set",
621
+ "livemode": false
622
+ },
623
+ {
624
+ "id": 2,
625
+ "createdAt": "2024-08-20T12:00:00.000Z",
626
+ "updatedAt": "2024-08-20T12:00:00.000Z",
627
+ "usageRecordId": "ur_ent_002",
628
+ "subscriptionItemId": "si_ent_001",
629
+ "quantity": 5,
630
+ "timestamp": 1724140800,
631
+ "action": "increment",
632
+ "livemode": false
633
+ }
634
+ ],
635
+ "usageRecordSummaries": [
636
+ {
637
+ "id": 1,
638
+ "createdAt": "2024-08-31T23:59:59.000Z",
639
+ "updatedAt": "2024-08-31T23:59:59.000Z",
640
+ "usageRecordSummaryId": "urs_ent_aug",
641
+ "subscriptionItemId": "si_ent_001",
642
+ "totalUsage": 60,
643
+ "period": {
644
+ "start": 1722470400,
645
+ "end": 1725148800
646
+ },
647
+ "invoiceId": null,
648
+ "livemode": false
649
+ }
650
+ ],
651
+ "checkoutSessions": [
652
+ {
653
+ "id": 1,
654
+ "createdAt": "2024-07-20T10:00:00.000Z",
655
+ "updatedAt": "2024-07-20T10:15:00.000Z",
656
+ "checkoutSessionId": "cs_completed_001",
657
+ "customerId": "cus_trial003",
658
+ "paymentIntentId": null,
659
+ "subscriptionId": "sub_trial",
660
+ "mode": "subscription",
661
+ "status": "complete",
662
+ "successUrl": "https://saas-co.io/signup/success?session_id={CHECKOUT_SESSION_ID}",
663
+ "cancelUrl": "https://saas-co.io/signup/cancel",
664
+ "url": "https://checkout.stripe.com/c/pay/cs_completed_001",
665
+ "lineItems": [
666
+ {
667
+ "priceId": "price_growth_mo",
668
+ "quantity": 5
669
+ }
670
+ ],
671
+ "amountTotal": 24500,
672
+ "currency": "usd",
673
+ "metadata": {
674
+ "source": "product_hunt"
675
+ },
676
+ "livemode": false
677
+ },
678
+ {
679
+ "id": 2,
680
+ "createdAt": "2024-08-25T14:00:00.000Z",
681
+ "updatedAt": "2024-08-25T14:00:00.000Z",
682
+ "checkoutSessionId": "cs_open_002",
683
+ "customerId": null,
684
+ "paymentIntentId": null,
685
+ "subscriptionId": null,
686
+ "mode": "subscription",
687
+ "status": "open",
688
+ "successUrl": "https://saas-co.io/welcome?session_id={CHECKOUT_SESSION_ID}",
689
+ "cancelUrl": "https://saas-co.io/pricing",
690
+ "url": "https://checkout.stripe.com/c/pay/cs_open_002",
691
+ "lineItems": [
692
+ {
693
+ "priceId": "price_starter_mo",
694
+ "quantity": 1
695
+ }
696
+ ],
697
+ "amountTotal": 1900,
698
+ "currency": "usd",
699
+ "metadata": {},
700
+ "livemode": false
701
+ }
702
+ ],
703
+ "events": [
704
+ {
705
+ "id": 1,
706
+ "createdAt": "2024-08-01T00:00:00.000Z",
707
+ "updatedAt": "2024-08-01T00:00:00.000Z",
708
+ "eventId": "evt_sub_created_001",
709
+ "type": "customer.subscription.created",
710
+ "data": {
711
+ "object": {
712
+ "id": "sub_ent_active",
713
+ "customer": "cus_active001",
714
+ "status": "active"
715
+ }
716
+ },
717
+ "apiVersion": "2024-06-20",
718
+ "created": 1722470400,
719
+ "livemode": false,
720
+ "pendingWebhooks": 0,
721
+ "request": {
722
+ "id": "req_sub001",
723
+ "idempotency_key": null
724
+ }
725
+ },
726
+ {
727
+ "id": 2,
728
+ "createdAt": "2024-08-01T00:01:00.000Z",
729
+ "updatedAt": "2024-08-01T00:01:00.000Z",
730
+ "eventId": "evt_inv_paid_001",
731
+ "type": "invoice.payment_succeeded",
732
+ "data": {
733
+ "object": {
734
+ "id": "in_aug_ent",
735
+ "customer": "cus_active001",
736
+ "amount_paid": 1495000
737
+ }
738
+ },
739
+ "apiVersion": "2024-06-20",
740
+ "created": 1722470460,
741
+ "livemode": false,
742
+ "pendingWebhooks": 0,
743
+ "request": {
744
+ "id": "req_inv001",
745
+ "idempotency_key": null
746
+ }
747
+ },
748
+ {
749
+ "id": 3,
750
+ "createdAt": "2024-08-01T00:02:00.000Z",
751
+ "updatedAt": "2024-08-01T00:02:00.000Z",
752
+ "eventId": "evt_sub_pastdue_001",
753
+ "type": "customer.subscription.updated",
754
+ "data": {
755
+ "object": {
756
+ "id": "sub_pastdue",
757
+ "customer": "cus_pastdue002",
758
+ "status": "past_due"
759
+ }
760
+ },
761
+ "apiVersion": "2024-06-20",
762
+ "created": 1722470520,
763
+ "livemode": false,
764
+ "pendingWebhooks": 1,
765
+ "request": {
766
+ "id": null,
767
+ "idempotency_key": null
768
+ }
769
+ },
770
+ {
771
+ "id": 4,
772
+ "createdAt": "2024-07-15T00:00:00.000Z",
773
+ "updatedAt": "2024-07-15T00:00:00.000Z",
774
+ "eventId": "evt_sub_canceled_001",
775
+ "type": "customer.subscription.deleted",
776
+ "data": {
777
+ "object": {
778
+ "id": "sub_canceled",
779
+ "customer": "cus_canceled004",
780
+ "status": "canceled"
781
+ }
782
+ },
783
+ "apiVersion": "2024-06-20",
784
+ "created": 1721001600,
785
+ "livemode": false,
786
+ "pendingWebhooks": 0,
787
+ "request": {
788
+ "id": "req_cancel001",
789
+ "idempotency_key": null
790
+ }
791
+ },
792
+ {
793
+ "id": 5,
794
+ "createdAt": "2024-07-20T10:15:00.000Z",
795
+ "updatedAt": "2024-07-20T10:15:00.000Z",
796
+ "eventId": "evt_checkout_complete_001",
797
+ "type": "checkout.session.completed",
798
+ "data": {
799
+ "object": {
800
+ "id": "cs_completed_001",
801
+ "customer": "cus_trial003",
802
+ "mode": "subscription"
803
+ }
804
+ },
805
+ "apiVersion": "2024-06-20",
806
+ "created": 1721470500,
807
+ "livemode": false,
808
+ "pendingWebhooks": 0,
809
+ "request": {
810
+ "id": "req_cs001",
811
+ "idempotency_key": null
812
+ }
813
+ }
814
+ ],
815
+ "webhookEndpoints": [
816
+ {
817
+ "id": 1,
818
+ "createdAt": "2024-02-01T00:00:00.000Z",
819
+ "updatedAt": "2024-02-01T00:00:00.000Z",
820
+ "webhookEndpointId": "we_prod_001",
821
+ "url": "https://saas-co.io/webhooks/stripe",
822
+ "enabledEvents": [
823
+ "customer.subscription.created",
824
+ "customer.subscription.updated",
825
+ "customer.subscription.deleted",
826
+ "invoice.payment_succeeded",
827
+ "invoice.payment_failed",
828
+ "checkout.session.completed"
829
+ ],
830
+ "status": "enabled",
831
+ "secret": "whsec_test_prod001abc123def456",
832
+ "description": "Production webhook for subscription lifecycle",
833
+ "apiVersion": "2024-06-20",
834
+ "livemode": false
835
+ },
836
+ {
837
+ "id": 2,
838
+ "createdAt": "2024-06-01T00:00:00.000Z",
839
+ "updatedAt": "2024-06-01T00:00:00.000Z",
840
+ "webhookEndpointId": "we_staging_002",
841
+ "url": "https://staging.saas-co.io/webhooks/stripe",
842
+ "enabledEvents": [
843
+ "*"
844
+ ],
845
+ "status": "enabled",
846
+ "secret": "whsec_test_stg002xyz789ghi012",
847
+ "description": "Staging endpoint \u2014 receives all events",
848
+ "apiVersion": "2024-06-20",
849
+ "livemode": false
850
+ }
60
851
  ],
61
- "balanceTransactions": []
62
- }
852
+ "setupIntents": [],
853
+ "taxRates": [],
854
+ "promotionCodes": []
855
+ }