@b3os/cli 0.2.0 → 0.2.2

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 (217) hide show
  1. package/README.md +87 -7
  2. package/assets/b3os-run.py +137 -0
  3. package/assets/skill/b3os/SKILL.md +111 -0
  4. package/dist/commands/_agents.d.ts +14 -0
  5. package/dist/commands/_agents.js +33 -0
  6. package/dist/commands/_agents.js.map +1 -0
  7. package/dist/commands/_common.js +6 -2
  8. package/dist/commands/_common.js.map +1 -1
  9. package/dist/commands/_context.d.ts +49 -0
  10. package/dist/commands/_context.js +260 -0
  11. package/dist/commands/_context.js.map +1 -0
  12. package/dist/commands/_next.d.ts +39 -0
  13. package/dist/commands/_next.js +77 -0
  14. package/dist/commands/_next.js.map +1 -0
  15. package/dist/commands/agent.d.ts +42 -0
  16. package/dist/commands/agent.js +218 -0
  17. package/dist/commands/agent.js.map +1 -0
  18. package/dist/commands/app.d.ts +2 -0
  19. package/dist/commands/app.js +559 -54
  20. package/dist/commands/app.js.map +1 -1
  21. package/dist/commands/auth.d.ts +88 -2
  22. package/dist/commands/auth.js +354 -44
  23. package/dist/commands/auth.js.map +1 -1
  24. package/dist/commands/docs.d.ts +54 -0
  25. package/dist/commands/docs.js +202 -0
  26. package/dist/commands/docs.js.map +1 -0
  27. package/dist/commands/doctor.d.ts +23 -0
  28. package/dist/commands/doctor.js +313 -0
  29. package/dist/commands/doctor.js.map +1 -0
  30. package/dist/commands/init.d.ts +38 -1
  31. package/dist/commands/init.js +259 -60
  32. package/dist/commands/init.js.map +1 -1
  33. package/dist/commands/listen.d.ts +30 -0
  34. package/dist/commands/listen.js +194 -0
  35. package/dist/commands/listen.js.map +1 -0
  36. package/dist/commands/manifest.d.ts +13 -1
  37. package/dist/commands/manifest.js +81 -18
  38. package/dist/commands/manifest.js.map +1 -1
  39. package/dist/commands/mcp.d.ts +25 -2
  40. package/dist/commands/mcp.js +120 -11
  41. package/dist/commands/mcp.js.map +1 -1
  42. package/dist/commands/sandbox.d.ts +35 -6
  43. package/dist/commands/sandbox.js +208 -9
  44. package/dist/commands/sandbox.js.map +1 -1
  45. package/dist/commands/setup.d.ts +39 -0
  46. package/dist/commands/setup.js +203 -0
  47. package/dist/commands/setup.js.map +1 -0
  48. package/dist/commands/tool.d.ts +154 -0
  49. package/dist/commands/tool.js +785 -0
  50. package/dist/commands/tool.js.map +1 -0
  51. package/dist/config.d.ts +30 -6
  52. package/dist/config.js +39 -8
  53. package/dist/config.js.map +1 -1
  54. package/dist/ctx.d.ts +5 -45
  55. package/dist/ctx.js +25 -160
  56. package/dist/ctx.js.map +1 -1
  57. package/dist/docs/index.json +1 -0
  58. package/dist/docs/pages/actions/call.md +300 -0
  59. package/dist/docs/pages/actions/catalog/airtable.md +737 -0
  60. package/dist/docs/pages/actions/catalog/arxiv.md +166 -0
  61. package/dist/docs/pages/actions/catalog/chainalysis-sanctions.md +125 -0
  62. package/dist/docs/pages/actions/catalog/coingecko.md +1558 -0
  63. package/dist/docs/pages/actions/catalog/deps-dev.md +465 -0
  64. package/dist/docs/pages/actions/catalog/dexscreener.md +568 -0
  65. package/dist/docs/pages/actions/catalog/discord.md +784 -0
  66. package/dist/docs/pages/actions/catalog/finnhub.md +776 -0
  67. package/dist/docs/pages/actions/catalog/frankfurter.md +438 -0
  68. package/dist/docs/pages/actions/catalog/github.md +1853 -0
  69. package/dist/docs/pages/actions/catalog/gmail.md +575 -0
  70. package/dist/docs/pages/actions/catalog/google-calendar.md +654 -0
  71. package/dist/docs/pages/actions/catalog/google-drive.md +502 -0
  72. package/dist/docs/pages/actions/catalog/google-sheets.md +700 -0
  73. package/dist/docs/pages/actions/catalog/hacker-news.md +542 -0
  74. package/dist/docs/pages/actions/catalog/http.md +824 -0
  75. package/dist/docs/pages/actions/catalog/hyperliquid.md +942 -0
  76. package/dist/docs/pages/actions/catalog/jira.md +920 -0
  77. package/dist/docs/pages/actions/catalog/kalshi.md +917 -0
  78. package/dist/docs/pages/actions/catalog/linear.md +1030 -0
  79. package/dist/docs/pages/actions/catalog/markets.md +21 -0
  80. package/dist/docs/pages/actions/catalog/morpho.md +247 -0
  81. package/dist/docs/pages/actions/catalog/notion.md +1077 -0
  82. package/dist/docs/pages/actions/catalog/nws.md +485 -0
  83. package/dist/docs/pages/actions/catalog/open-meteo.md +559 -0
  84. package/dist/docs/pages/actions/catalog/polymarket.md +1523 -0
  85. package/dist/docs/pages/actions/catalog/pushbullet.md +220 -0
  86. package/dist/docs/pages/actions/catalog/resend.md +307 -0
  87. package/dist/docs/pages/actions/catalog/s3.md +513 -0
  88. package/dist/docs/pages/actions/catalog/sec-edgar.md +487 -0
  89. package/dist/docs/pages/actions/catalog/slack.md +2629 -0
  90. package/dist/docs/pages/actions/catalog/stripe.md +1405 -0
  91. package/dist/docs/pages/actions/catalog/wikipedia.md +379 -0
  92. package/dist/docs/pages/actions/catalog.md +46 -0
  93. package/dist/docs/pages/actions/limits.md +50 -0
  94. package/dist/docs/pages/actions/model-tools.md +225 -0
  95. package/dist/docs/pages/actions/packs.md +148 -0
  96. package/dist/docs/pages/actions/settings.md +69 -0
  97. package/dist/docs/pages/actions/tools.md +244 -0
  98. package/dist/docs/pages/actions/triggers.md +149 -0
  99. package/dist/docs/pages/actions.md +88 -0
  100. package/dist/docs/pages/compat/anthropic.md +168 -0
  101. package/dist/docs/pages/compat/e2b.md +194 -0
  102. package/dist/docs/pages/compat/firecrawl.md +138 -0
  103. package/dist/docs/pages/compat/openai.md +168 -0
  104. package/dist/docs/pages/concepts/auth.md +151 -0
  105. package/dist/docs/pages/concepts/beta.md +55 -0
  106. package/dist/docs/pages/concepts/glossary.md +71 -0
  107. package/dist/docs/pages/concepts/ids.md +98 -0
  108. package/dist/docs/pages/concepts/jobs.md +229 -0
  109. package/dist/docs/pages/concepts/latency.md +138 -0
  110. package/dist/docs/pages/concepts/limits.md +191 -0
  111. package/dist/docs/pages/concepts/stack.md +59 -0
  112. package/dist/docs/pages/concepts/timing.md +86 -0
  113. package/dist/docs/pages/concepts/usage.md +110 -0
  114. package/dist/docs/pages/design/b3os-yaml.md +370 -0
  115. package/dist/docs/pages/design/deploy-from-github.md +122 -0
  116. package/dist/docs/pages/design/observability.md +134 -0
  117. package/dist/docs/pages/errors.md +1824 -0
  118. package/dist/docs/pages/infer/chat.md +570 -0
  119. package/dist/docs/pages/infer/limits.md +55 -0
  120. package/dist/docs/pages/infer/messages.md +185 -0
  121. package/dist/docs/pages/infer/responses.md +173 -0
  122. package/dist/docs/pages/infer/settings.md +154 -0
  123. package/dist/docs/pages/infer/speech.md +323 -0
  124. package/dist/docs/pages/infer.md +154 -0
  125. package/dist/docs/pages/introduction.md +162 -0
  126. package/dist/docs/pages/platform/addresses.md +174 -0
  127. package/dist/docs/pages/platform/call-log.md +99 -0
  128. package/dist/docs/pages/platform/custom-domains.md +104 -0
  129. package/dist/docs/pages/platform/keys.md +79 -0
  130. package/dist/docs/pages/platform/limits.md +57 -0
  131. package/dist/docs/pages/platform/members.md +101 -0
  132. package/dist/docs/pages/platform/requests.md +116 -0
  133. package/dist/docs/pages/platform/settings.md +129 -0
  134. package/dist/docs/pages/platform/webhooks.md +68 -0
  135. package/dist/docs/pages/platform.md +67 -0
  136. package/dist/docs/pages/quickstart/mcp.md +94 -0
  137. package/dist/docs/pages/quickstart/sandbox-agent.md +205 -0
  138. package/dist/docs/pages/quickstart/scrape.md +134 -0
  139. package/dist/docs/pages/quickstart.md +45 -0
  140. package/dist/docs/pages/render/inspections.md +162 -0
  141. package/dist/docs/pages/render/limits.md +72 -0
  142. package/dist/docs/pages/render/screenshots.md +179 -0
  143. package/dist/docs/pages/render/settings.md +431 -0
  144. package/dist/docs/pages/render/styles.md +342 -0
  145. package/dist/docs/pages/render/videos.md +272 -0
  146. package/dist/docs/pages/render.md +118 -0
  147. package/dist/docs/pages/routines/callables.md +174 -0
  148. package/dist/docs/pages/routines/definitions.md +361 -0
  149. package/dist/docs/pages/routines/limits.md +117 -0
  150. package/dist/docs/pages/routines/runs.md +328 -0
  151. package/dist/docs/pages/routines/settings.md +104 -0
  152. package/dist/docs/pages/routines/triggers.md +339 -0
  153. package/dist/docs/pages/routines.md +216 -0
  154. package/dist/docs/pages/sandboxes/agents.md +217 -0
  155. package/dist/docs/pages/sandboxes/commands.md +272 -0
  156. package/dist/docs/pages/sandboxes/images.md +166 -0
  157. package/dist/docs/pages/sandboxes/limits.md +143 -0
  158. package/dist/docs/pages/sandboxes/ports.md +260 -0
  159. package/dist/docs/pages/sandboxes/settings.md +358 -0
  160. package/dist/docs/pages/sandboxes/snapshots.md +423 -0
  161. package/dist/docs/pages/sandboxes/swarms.md +146 -0
  162. package/dist/docs/pages/sandboxes/volumes.md +131 -0
  163. package/dist/docs/pages/sandboxes.md +231 -0
  164. package/dist/docs/pages/sdks/cli.md +121 -0
  165. package/dist/docs/pages/sdks/mcp.md +169 -0
  166. package/dist/docs/pages/sdks/python.md +146 -0
  167. package/dist/docs/pages/sdks/typescript.md +202 -0
  168. package/dist/docs/pages/sdks.md +282 -0
  169. package/dist/docs/pages/settings.md +33 -0
  170. package/dist/docs/pages/vault/limits.md +46 -0
  171. package/dist/docs/pages/vault.md +133 -0
  172. package/dist/docs/pages/vision/agent-browser.md +115 -0
  173. package/dist/docs/pages/vision/crawl.md +333 -0
  174. package/dist/docs/pages/vision/extract.md +152 -0
  175. package/dist/docs/pages/vision/fetcher.md +15 -0
  176. package/dist/docs/pages/vision/limits.md +79 -0
  177. package/dist/docs/pages/vision/profiles.md +111 -0
  178. package/dist/docs/pages/vision/proxy.md +131 -0
  179. package/dist/docs/pages/vision/scrape.md +356 -0
  180. package/dist/docs/pages/vision/sessions.md +311 -0
  181. package/dist/docs/pages/vision/settings.md +656 -0
  182. package/dist/docs/pages/vision.md +175 -0
  183. package/dist/errors.d.ts +129 -0
  184. package/dist/errors.js +326 -0
  185. package/dist/errors.js.map +1 -0
  186. package/dist/main.d.ts +1 -1
  187. package/dist/main.js +26 -13
  188. package/dist/main.js.map +1 -1
  189. package/dist/manifest/apply.d.ts +4 -0
  190. package/dist/manifest/apply.js +2 -0
  191. package/dist/manifest/apply.js.map +1 -1
  192. package/dist/manifest/domains.d.ts +50 -0
  193. package/dist/manifest/domains.js +159 -0
  194. package/dist/manifest/domains.js.map +1 -0
  195. package/dist/manifest/link.d.ts +20 -0
  196. package/dist/manifest/link.js +24 -0
  197. package/dist/manifest/link.js.map +1 -0
  198. package/dist/manifest/record.d.ts +1 -1
  199. package/dist/tool/archive.d.ts +33 -0
  200. package/dist/tool/archive.js +174 -0
  201. package/dist/tool/archive.js.map +1 -0
  202. package/dist/tool/calls.d.ts +46 -0
  203. package/dist/tool/calls.js +274 -0
  204. package/dist/tool/calls.js.map +1 -0
  205. package/dist/tool/checks.d.ts +21 -0
  206. package/dist/tool/checks.js +145 -0
  207. package/dist/tool/checks.js.map +1 -0
  208. package/dist/tool/elf.d.ts +19 -0
  209. package/dist/tool/elf.js +107 -0
  210. package/dist/tool/elf.js.map +1 -0
  211. package/dist/tool/predict.d.ts +8 -0
  212. package/dist/tool/predict.js +38 -0
  213. package/dist/tool/predict.js.map +1 -0
  214. package/dist/tool/ustar.d.ts +5 -0
  215. package/dist/tool/ustar.js +220 -0
  216. package/dist/tool/ustar.js.map +1 -0
  217. package/package.json +6 -5
@@ -0,0 +1,1405 @@
1
+ # Stripe (read-only)
2
+
3
+ > The io.b3os/stripe pack: 14 actions and 2 triggers with call snippets, fixture outputs, connection setup and error codes, generated from version 1.0.0.
4
+
5
+ Source: https://docs.beta.b3os.org/actions/catalog/stripe.md
6
+
7
+ <a id="stripe"></a>
8
+
9
+ `io.b3os/stripe` 1.0.0 · `payments`, `billing` · MIT
10
+
11
+ Read your Stripe account with your own restricted key: balance, customers (list, get, search), charges, payment intents, invoices with line items, subscriptions, products, prices and events, plus triggers for new events (polled, or delivered to a webhook endpoint you add in the Stripe Dashboard). Read-only: nothing here creates, changes or refunds anything. Amounts are in the smallest currency unit (cents). Test-mode keys read test data.
12
+
13
+ Every call's result carries `upstream_status` and `timing`: `validate_ms`, `inject_ms`, `render_ms`, `upstream_ms`, `map_ms` and `total_ms`. `upstream` is the service's time; the others are B3OS's own ([call actions](https://docs.beta.b3os.org/actions/call)). The snippets below show no timing values, because a fixture records none.
14
+
15
+ ## Connection
16
+
17
+ `secret_key`, type `bearer`: Stripe restricted key.
18
+
19
+ A restricted key (rk_live_ or rk_test_) with Read access to the resources the actions use (Balance, Customers, Charges, PaymentIntents, Invoices, Subscriptions, Products, Prices, Events). A secret key works too but grants far more than this pack needs.
20
+
21
+ How to get one: [docs.stripe.com](https://docs.stripe.com/keys#limit-access).
22
+
23
+ The credential is sent only to `api.stripe.com`.
24
+
25
+ Store the credential once as a [vault connection](https://docs.beta.b3os.org/vault) for this pack and key, then name its id in a call's `connections`. Leave the key out and B3OS uses the project's newest connection for the pack and key without a `subject` ([connections](https://docs.beta.b3os.org/actions/call#connections)).
26
+
27
+ Hosts it reaches: `api.stripe.com`.
28
+
29
+ ## Actions
30
+
31
+ | Action | Effect | MCP tool | Title |
32
+ |---|---|---|---|
33
+ | [`get-balance`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-get-balance) | read | `stripe__get-balance` | Get balance |
34
+ | [`list-customers`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-customers) | read | `stripe__list-customers` | List customers |
35
+ | [`get-customer`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-get-customer) | read | `stripe__get-customer` | Get customer |
36
+ | [`search-customers`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-search-customers) | read | `stripe__search-customers` | Search customers |
37
+ | [`list-charges`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-charges) | read | `stripe__list-charges` | List charges |
38
+ | [`list-payment-intents`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-payment-intents) | read | `stripe__list-payment-intents` | List payment intents |
39
+ | [`get-payment-intent`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-get-payment-intent) | read | `stripe__get-payment-intent` | Get payment intent |
40
+ | [`list-invoices`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-invoices) | read | `stripe__list-invoices` | List invoices |
41
+ | [`get-invoice`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-get-invoice) | read | `stripe__get-invoice` | Get invoice |
42
+ | [`list-subscriptions`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-subscriptions) | read | `stripe__list-subscriptions` | List subscriptions |
43
+ | [`list-products`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-products) | read | `stripe__list-products` | List products |
44
+ | [`list-prices`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-prices) | read | `stripe__list-prices` | List prices |
45
+ | [`list-events`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-list-events) | read | `stripe__list-events` | List events |
46
+ | [`get-event`](https://docs.beta.b3os.org/actions/catalog/stripe#stripe-get-event) | read | `stripe__get-event` | Get event |
47
+
48
+ <h3 id="stripe-get-balance"><code>get-balance</code></h3>
49
+
50
+ **Get balance.** Funds in the Stripe balance per currency: available now and pending (not yet settled), in the smallest currency unit.
51
+
52
+ Ref `io.b3os/stripe/get-balance@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__get-balance`
53
+
54
+ **curl**
55
+
56
+ ```bash
57
+ curl -s https://beta-api.b3os.org/v1/actions/call \
58
+ -H "Authorization: Bearer $B3OS_API_KEY" \
59
+ -H "Content-Type: application/json" \
60
+ -d '{
61
+ "ref": "io.b3os/stripe/get-balance@1",
62
+ "input": {},
63
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
64
+ }'
65
+ ```
66
+ **TypeScript**
67
+
68
+ ```ts
69
+ import { B3OS } from "@b3os/sdk";
70
+
71
+ const b3os = new B3OS();
72
+ const result = await b3os.actions.call({
73
+ ref: "io.b3os/stripe/get-balance@1",
74
+ input: {},
75
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
76
+ });
77
+ console.log(result.output);
78
+ ```
79
+ **Python**
80
+
81
+ ```python
82
+ from b3os import B3OS
83
+
84
+ b3os = B3OS()
85
+ result = b3os.actions.call({
86
+ "ref": "io.b3os/stripe/get-balance@1",
87
+ "input": {},
88
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
89
+ })
90
+ print(result["output"])
91
+ ```
92
+ **MCP**
93
+
94
+ ```json
95
+ {
96
+ "method": "tools/call",
97
+ "params": {"name": "stripe__get-balance", "arguments": {}}
98
+ }
99
+ ```
100
+
101
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__get-balance` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
102
+
103
+ Output, labeled `fixture`: Get balance (documented response shape, example values). From the bundle's `fixtures/get-balance.json`, not a live call.
104
+
105
+ ```json
106
+ {
107
+ "available": [{"amount": 1203400, "currency": "usd"}],
108
+ "pending": [{"amount": 54900, "currency": "usd"}],
109
+ "livemode": false
110
+ }
111
+ ```
112
+
113
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
114
+
115
+ | `pack_error.code` | Service status | Retryable | Message |
116
+ |---|---|---|---|
117
+ | `not_found` | 404 | no | built from the service's response |
118
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
119
+ | `forbidden` | 403 | no | built from the service's response |
120
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
121
+ | `invalid_request` | 400 | no | built from the service's response |
122
+
123
+ <h3 id="stripe-list-customers"><code>list-customers</code></h3>
124
+
125
+ **List customers.** Customers, newest first, optionally only those with an exact email. Page with starting_after = the last id while has_more is true.
126
+
127
+ Ref `io.b3os/stripe/list-customers@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-customers`
128
+
129
+ **curl**
130
+
131
+ ```bash
132
+ curl -s https://beta-api.b3os.org/v1/actions/call \
133
+ -H "Authorization: Bearer $B3OS_API_KEY" \
134
+ -H "Content-Type: application/json" \
135
+ -d '{
136
+ "ref": "io.b3os/stripe/list-customers@1",
137
+ "input": {"email": "buyer@example.com", "limit": 1},
138
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
139
+ }'
140
+ ```
141
+ **TypeScript**
142
+
143
+ ```ts
144
+ import { B3OS } from "@b3os/sdk";
145
+
146
+ const b3os = new B3OS();
147
+ const result = await b3os.actions.call({
148
+ ref: "io.b3os/stripe/list-customers@1",
149
+ input: { email: "buyer@example.com", limit: 1 },
150
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
151
+ });
152
+ console.log(result.output);
153
+ ```
154
+ **Python**
155
+
156
+ ```python
157
+ from b3os import B3OS
158
+
159
+ b3os = B3OS()
160
+ result = b3os.actions.call({
161
+ "ref": "io.b3os/stripe/list-customers@1",
162
+ "input": {"email": "buyer@example.com", "limit": 1},
163
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
164
+ })
165
+ print(result["output"])
166
+ ```
167
+ **MCP**
168
+
169
+ ```json
170
+ {
171
+ "method": "tools/call",
172
+ "params": {
173
+ "name": "stripe__list-customers",
174
+ "arguments": {"email": "buyer@example.com", "limit": 1}
175
+ }
176
+ }
177
+ ```
178
+
179
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-customers` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
180
+
181
+ Output, labeled `fixture`: List customers (documented response shape, example values). From the bundle's `fixtures/list-customers.json`, not a live call.
182
+
183
+ ```json
184
+ {
185
+ "data": [
186
+ {
187
+ "id": "cus_Qexample0001",
188
+ "email": "buyer@example.com",
189
+ "name": "Jane Buyer",
190
+ "description": null,
191
+ "created": 1792970000,
192
+ "currency": "usd",
193
+ "balance": 0,
194
+ "delinquent": false,
195
+ "livemode": false,
196
+ "metadata": {"crm_id": "8812"}
197
+ }
198
+ ],
199
+ "has_more": false
200
+ }
201
+ ```
202
+
203
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
204
+
205
+ | `pack_error.code` | Service status | Retryable | Message |
206
+ |---|---|---|---|
207
+ | `not_found` | 404 | no | built from the service's response |
208
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
209
+ | `forbidden` | 403 | no | built from the service's response |
210
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
211
+ | `invalid_request` | 400 | no | built from the service's response |
212
+
213
+ <h3 id="stripe-get-customer"><code>get-customer</code></h3>
214
+
215
+ **Get customer.** One customer by id: email, name, description, currency, credit balance, delinquent flag and metadata.
216
+
217
+ Ref `io.b3os/stripe/get-customer@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__get-customer`
218
+
219
+ **curl**
220
+
221
+ ```bash
222
+ curl -s https://beta-api.b3os.org/v1/actions/call \
223
+ -H "Authorization: Bearer $B3OS_API_KEY" \
224
+ -H "Content-Type: application/json" \
225
+ -d '{
226
+ "ref": "io.b3os/stripe/get-customer@1",
227
+ "input": {"id": "cus_Qexample0001"},
228
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
229
+ }'
230
+ ```
231
+ **TypeScript**
232
+
233
+ ```ts
234
+ import { B3OS } from "@b3os/sdk";
235
+
236
+ const b3os = new B3OS();
237
+ const result = await b3os.actions.call({
238
+ ref: "io.b3os/stripe/get-customer@1",
239
+ input: { id: "cus_Qexample0001" },
240
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
241
+ });
242
+ console.log(result.output);
243
+ ```
244
+ **Python**
245
+
246
+ ```python
247
+ from b3os import B3OS
248
+
249
+ b3os = B3OS()
250
+ result = b3os.actions.call({
251
+ "ref": "io.b3os/stripe/get-customer@1",
252
+ "input": {"id": "cus_Qexample0001"},
253
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
254
+ })
255
+ print(result["output"])
256
+ ```
257
+ **MCP**
258
+
259
+ ```json
260
+ {
261
+ "method": "tools/call",
262
+ "params": {
263
+ "name": "stripe__get-customer",
264
+ "arguments": {"id": "cus_Qexample0001"}
265
+ }
266
+ }
267
+ ```
268
+
269
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__get-customer` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
270
+
271
+ Output, labeled `fixture`: Get customer (documented response shape, example values). From the bundle's `fixtures/get-customer.json`, not a live call.
272
+
273
+ ```json
274
+ {
275
+ "id": "cus_Qexample0001",
276
+ "email": "buyer@example.com",
277
+ "name": "Jane Buyer",
278
+ "description": null,
279
+ "created": 1792970000,
280
+ "currency": "usd",
281
+ "balance": 0,
282
+ "delinquent": false,
283
+ "livemode": false,
284
+ "metadata": {"crm_id": "8812"}
285
+ }
286
+ ```
287
+
288
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
289
+
290
+ | `pack_error.code` | Service status | Retryable | Message |
291
+ |---|---|---|---|
292
+ | `not_found` | 404 | no | built from the service's response |
293
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
294
+ | `forbidden` | 403 | no | built from the service's response |
295
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
296
+ | `invalid_request` | 400 | no | built from the service's response |
297
+
298
+ <h3 id="stripe-search-customers"><code>search-customers</code></h3>
299
+
300
+ **Search customers.** Search customers with Stripe's search query language, for example email:'jane@example.com', name~'jane', metadata['crm_id']:'8812' or created>1700000000, combined with AND/OR. Newly changed customers can take up to a minute to appear. Page with next_page.
301
+
302
+ Ref `io.b3os/stripe/search-customers@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__search-customers`
303
+
304
+ **curl**
305
+
306
+ ```bash
307
+ curl -s https://beta-api.b3os.org/v1/actions/call \
308
+ -H "Authorization: Bearer $B3OS_API_KEY" \
309
+ -H "Content-Type: application/json" \
310
+ -d '{
311
+ "ref": "io.b3os/stripe/search-customers@1",
312
+ "input": {"query": "metadata['\''crm_id'\'']:'\''8812'\''", "limit": 1},
313
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
314
+ }'
315
+ ```
316
+ **TypeScript**
317
+
318
+ ```ts
319
+ import { B3OS } from "@b3os/sdk";
320
+
321
+ const b3os = new B3OS();
322
+ const result = await b3os.actions.call({
323
+ ref: "io.b3os/stripe/search-customers@1",
324
+ input: { query: "metadata['crm_id']:'8812'", limit: 1 },
325
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
326
+ });
327
+ console.log(result.output);
328
+ ```
329
+ **Python**
330
+
331
+ ```python
332
+ from b3os import B3OS
333
+
334
+ b3os = B3OS()
335
+ result = b3os.actions.call({
336
+ "ref": "io.b3os/stripe/search-customers@1",
337
+ "input": {"query": "metadata['crm_id']:'8812'", "limit": 1},
338
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
339
+ })
340
+ print(result["output"])
341
+ ```
342
+ **MCP**
343
+
344
+ ```json
345
+ {
346
+ "method": "tools/call",
347
+ "params": {
348
+ "name": "stripe__search-customers",
349
+ "arguments": {"query": "metadata['crm_id']:'8812'", "limit": 1}
350
+ }
351
+ }
352
+ ```
353
+
354
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__search-customers` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
355
+
356
+ Output, labeled `fixture`: Search customers (documented response shape, example values). From the bundle's `fixtures/search-customers.json`, not a live call.
357
+
358
+ ```json
359
+ {
360
+ "data": [
361
+ {
362
+ "id": "cus_Qexample0001",
363
+ "email": "buyer@example.com",
364
+ "name": "Jane Buyer",
365
+ "description": null,
366
+ "created": 1792970000,
367
+ "currency": "usd",
368
+ "balance": 0,
369
+ "delinquent": false,
370
+ "livemode": false,
371
+ "metadata": {"crm_id": "8812"}
372
+ }
373
+ ],
374
+ "has_more": false,
375
+ "next_page": null
376
+ }
377
+ ```
378
+
379
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
380
+
381
+ | `pack_error.code` | Service status | Retryable | Message |
382
+ |---|---|---|---|
383
+ | `not_found` | 404 | no | built from the service's response |
384
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
385
+ | `forbidden` | 403 | no | built from the service's response |
386
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
387
+ | `invalid_request` | 400 | no | built from the service's response |
388
+
389
+ <h3 id="stripe-list-charges"><code>list-charges</code></h3>
390
+
391
+ **List charges.** Charges, newest first, optionally for one customer: amount, refunded amount, status, paid and refunded flags, failure message and receipt URL.
392
+
393
+ Ref `io.b3os/stripe/list-charges@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-charges`
394
+
395
+ **curl**
396
+
397
+ ```bash
398
+ curl -s https://beta-api.b3os.org/v1/actions/call \
399
+ -H "Authorization: Bearer $B3OS_API_KEY" \
400
+ -H "Content-Type: application/json" \
401
+ -d '{
402
+ "ref": "io.b3os/stripe/list-charges@1",
403
+ "input": {"customer": "cus_Qexample0001", "limit": 1},
404
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
405
+ }'
406
+ ```
407
+ **TypeScript**
408
+
409
+ ```ts
410
+ import { B3OS } from "@b3os/sdk";
411
+
412
+ const b3os = new B3OS();
413
+ const result = await b3os.actions.call({
414
+ ref: "io.b3os/stripe/list-charges@1",
415
+ input: { customer: "cus_Qexample0001", limit: 1 },
416
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
417
+ });
418
+ console.log(result.output);
419
+ ```
420
+ **Python**
421
+
422
+ ```python
423
+ from b3os import B3OS
424
+
425
+ b3os = B3OS()
426
+ result = b3os.actions.call({
427
+ "ref": "io.b3os/stripe/list-charges@1",
428
+ "input": {"customer": "cus_Qexample0001", "limit": 1},
429
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
430
+ })
431
+ print(result["output"])
432
+ ```
433
+ **MCP**
434
+
435
+ ```json
436
+ {
437
+ "method": "tools/call",
438
+ "params": {
439
+ "name": "stripe__list-charges",
440
+ "arguments": {"customer": "cus_Qexample0001", "limit": 1}
441
+ }
442
+ }
443
+ ```
444
+
445
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-charges` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
446
+
447
+ Output, labeled `fixture`: List charges (documented response shape, example values). From the bundle's `fixtures/list-charges.json`, not a live call.
448
+
449
+ ```json
450
+ {
451
+ "data": [
452
+ {
453
+ "id": "ch_3Qexample0001",
454
+ "amount": 4900,
455
+ "amount_refunded": 0,
456
+ "currency": "usd",
457
+ "status": "succeeded",
458
+ "paid": true,
459
+ "refunded": false,
460
+ "customer": "cus_Qexample0001",
461
+ "description": "Pro plan",
462
+ "payment_intent": "pi_3Qexample0001",
463
+ "failure_message": null,
464
+ "receipt_url": "https://pay.stripe.com/receipts/payment/CAcaFwoV",
465
+ "created": 1792970390
466
+ }
467
+ ],
468
+ "has_more": true
469
+ }
470
+ ```
471
+
472
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
473
+
474
+ | `pack_error.code` | Service status | Retryable | Message |
475
+ |---|---|---|---|
476
+ | `not_found` | 404 | no | built from the service's response |
477
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
478
+ | `forbidden` | 403 | no | built from the service's response |
479
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
480
+ | `invalid_request` | 400 | no | built from the service's response |
481
+
482
+ <h3 id="stripe-list-payment-intents"><code>list-payment-intents</code></h3>
483
+
484
+ **List payment intents.** Payment intents, newest first, optionally for one customer, with amount, amount received, status and latest charge.
485
+
486
+ Ref `io.b3os/stripe/list-payment-intents@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-payment-intents`
487
+
488
+ **curl**
489
+
490
+ ```bash
491
+ curl -s https://beta-api.b3os.org/v1/actions/call \
492
+ -H "Authorization: Bearer $B3OS_API_KEY" \
493
+ -H "Content-Type: application/json" \
494
+ -d '{
495
+ "ref": "io.b3os/stripe/list-payment-intents@1",
496
+ "input": {"customer": "cus_Qexample0001", "limit": 1},
497
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
498
+ }'
499
+ ```
500
+ **TypeScript**
501
+
502
+ ```ts
503
+ import { B3OS } from "@b3os/sdk";
504
+
505
+ const b3os = new B3OS();
506
+ const result = await b3os.actions.call({
507
+ ref: "io.b3os/stripe/list-payment-intents@1",
508
+ input: { customer: "cus_Qexample0001", limit: 1 },
509
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
510
+ });
511
+ console.log(result.output);
512
+ ```
513
+ **Python**
514
+
515
+ ```python
516
+ from b3os import B3OS
517
+
518
+ b3os = B3OS()
519
+ result = b3os.actions.call({
520
+ "ref": "io.b3os/stripe/list-payment-intents@1",
521
+ "input": {"customer": "cus_Qexample0001", "limit": 1},
522
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
523
+ })
524
+ print(result["output"])
525
+ ```
526
+ **MCP**
527
+
528
+ ```json
529
+ {
530
+ "method": "tools/call",
531
+ "params": {
532
+ "name": "stripe__list-payment-intents",
533
+ "arguments": {"customer": "cus_Qexample0001", "limit": 1}
534
+ }
535
+ }
536
+ ```
537
+
538
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-payment-intents` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
539
+
540
+ Output, labeled `fixture`: List payment intents (documented response shape, example values). From the bundle's `fixtures/list-payment-intents.json`, not a live call.
541
+
542
+ ```json
543
+ {
544
+ "data": [
545
+ {
546
+ "id": "pi_3Qexample0001",
547
+ "amount": 4900,
548
+ "amount_received": 4900,
549
+ "currency": "usd",
550
+ "status": "succeeded",
551
+ "customer": "cus_Qexample0001",
552
+ "description": "Pro plan",
553
+ "latest_charge": "ch_3Qexample0001",
554
+ "created": 1792970380,
555
+ "metadata": {}
556
+ }
557
+ ],
558
+ "has_more": false
559
+ }
560
+ ```
561
+
562
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
563
+
564
+ | `pack_error.code` | Service status | Retryable | Message |
565
+ |---|---|---|---|
566
+ | `not_found` | 404 | no | built from the service's response |
567
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
568
+ | `forbidden` | 403 | no | built from the service's response |
569
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
570
+ | `invalid_request` | 400 | no | built from the service's response |
571
+
572
+ <h3 id="stripe-get-payment-intent"><code>get-payment-intent</code></h3>
573
+
574
+ **Get payment intent.** One payment intent by id: amount, amount received, currency, status, customer, latest charge and metadata.
575
+
576
+ Ref `io.b3os/stripe/get-payment-intent@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__get-payment-intent`
577
+
578
+ **curl**
579
+
580
+ ```bash
581
+ curl -s https://beta-api.b3os.org/v1/actions/call \
582
+ -H "Authorization: Bearer $B3OS_API_KEY" \
583
+ -H "Content-Type: application/json" \
584
+ -d '{
585
+ "ref": "io.b3os/stripe/get-payment-intent@1",
586
+ "input": {"id": "pi_3Qexample0001"},
587
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
588
+ }'
589
+ ```
590
+ **TypeScript**
591
+
592
+ ```ts
593
+ import { B3OS } from "@b3os/sdk";
594
+
595
+ const b3os = new B3OS();
596
+ const result = await b3os.actions.call({
597
+ ref: "io.b3os/stripe/get-payment-intent@1",
598
+ input: { id: "pi_3Qexample0001" },
599
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
600
+ });
601
+ console.log(result.output);
602
+ ```
603
+ **Python**
604
+
605
+ ```python
606
+ from b3os import B3OS
607
+
608
+ b3os = B3OS()
609
+ result = b3os.actions.call({
610
+ "ref": "io.b3os/stripe/get-payment-intent@1",
611
+ "input": {"id": "pi_3Qexample0001"},
612
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
613
+ })
614
+ print(result["output"])
615
+ ```
616
+ **MCP**
617
+
618
+ ```json
619
+ {
620
+ "method": "tools/call",
621
+ "params": {
622
+ "name": "stripe__get-payment-intent",
623
+ "arguments": {"id": "pi_3Qexample0001"}
624
+ }
625
+ }
626
+ ```
627
+
628
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__get-payment-intent` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
629
+
630
+ Output, labeled `fixture`: Get payment intent (documented response shape, example values). From the bundle's `fixtures/get-payment-intent.json`, not a live call.
631
+
632
+ ```json
633
+ {
634
+ "id": "pi_3Qexample0001",
635
+ "amount": 4900,
636
+ "amount_received": 4900,
637
+ "currency": "usd",
638
+ "status": "succeeded",
639
+ "customer": "cus_Qexample0001",
640
+ "description": "Pro plan",
641
+ "latest_charge": "ch_3Qexample0001",
642
+ "created": 1792970380,
643
+ "metadata": {}
644
+ }
645
+ ```
646
+
647
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
648
+
649
+ | `pack_error.code` | Service status | Retryable | Message |
650
+ |---|---|---|---|
651
+ | `not_found` | 404 | no | built from the service's response |
652
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
653
+ | `forbidden` | 403 | no | built from the service's response |
654
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
655
+ | `invalid_request` | 400 | no | built from the service's response |
656
+
657
+ <h3 id="stripe-list-invoices"><code>list-invoices</code></h3>
658
+
659
+ **List invoices.** Invoices, newest first, filtered by customer, subscription or status (draft, open, paid, uncollectible, void), with totals, amounts due and paid, due date, hosted page and PDF links and line items.
660
+
661
+ Ref `io.b3os/stripe/list-invoices@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-invoices`
662
+
663
+ **curl**
664
+
665
+ ```bash
666
+ curl -s https://beta-api.b3os.org/v1/actions/call \
667
+ -H "Authorization: Bearer $B3OS_API_KEY" \
668
+ -H "Content-Type: application/json" \
669
+ -d '{
670
+ "ref": "io.b3os/stripe/list-invoices@1",
671
+ "input": {"customer": "cus_Qexample0001", "status": "paid", "limit": 1},
672
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
673
+ }'
674
+ ```
675
+ **TypeScript**
676
+
677
+ ```ts
678
+ import { B3OS } from "@b3os/sdk";
679
+
680
+ const b3os = new B3OS();
681
+ const result = await b3os.actions.call({
682
+ ref: "io.b3os/stripe/list-invoices@1",
683
+ input: { customer: "cus_Qexample0001", status: "paid", limit: 1 },
684
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
685
+ });
686
+ console.log(result.output);
687
+ ```
688
+ **Python**
689
+
690
+ ```python
691
+ from b3os import B3OS
692
+
693
+ b3os = B3OS()
694
+ result = b3os.actions.call({
695
+ "ref": "io.b3os/stripe/list-invoices@1",
696
+ "input": {"customer": "cus_Qexample0001", "status": "paid", "limit": 1},
697
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
698
+ })
699
+ print(result["output"])
700
+ ```
701
+ **MCP**
702
+
703
+ ```json
704
+ {
705
+ "method": "tools/call",
706
+ "params": {
707
+ "name": "stripe__list-invoices",
708
+ "arguments": {"customer": "cus_Qexample0001", "status": "paid", "limit": 1}
709
+ }
710
+ }
711
+ ```
712
+
713
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-invoices` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
714
+
715
+ Output, labeled `fixture`: List invoices (documented response shape, example values). From the bundle's `fixtures/list-invoices.json`, not a live call.
716
+
717
+ ```json
718
+ {
719
+ "data": [
720
+ {
721
+ "id": "in_1Qexample0001",
722
+ "number": "B3D4F-0007",
723
+ "status": "paid",
724
+ "customer": "cus_Qexample0001",
725
+ "customer_email": "buyer@example.com",
726
+ "currency": "usd",
727
+ "total": 4900,
728
+ "amount_due": 4900,
729
+ "amount_paid": 4900,
730
+ "amount_remaining": 0,
731
+ "due_date": null,
732
+ "created": 1792970300,
733
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1Qexample/test_YWNjdF8x",
734
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_1Qexample/test_YWNjdF8x/pdf",
735
+ "lines": [
736
+ {
737
+ "description": "1 x Pro (at $49.00 / month)",
738
+ "amount": 4900,
739
+ "quantity": 1
740
+ }
741
+ ]
742
+ }
743
+ ],
744
+ "has_more": false
745
+ }
746
+ ```
747
+
748
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
749
+
750
+ | `pack_error.code` | Service status | Retryable | Message |
751
+ |---|---|---|---|
752
+ | `not_found` | 404 | no | built from the service's response |
753
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
754
+ | `forbidden` | 403 | no | built from the service's response |
755
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
756
+ | `invalid_request` | 400 | no | built from the service's response |
757
+
758
+ <h3 id="stripe-get-invoice"><code>get-invoice</code></h3>
759
+
760
+ **Get invoice.** One invoice by id with status, number, totals, amounts due, paid and remaining, due date, links and line items.
761
+
762
+ Ref `io.b3os/stripe/get-invoice@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__get-invoice`
763
+
764
+ **curl**
765
+
766
+ ```bash
767
+ curl -s https://beta-api.b3os.org/v1/actions/call \
768
+ -H "Authorization: Bearer $B3OS_API_KEY" \
769
+ -H "Content-Type: application/json" \
770
+ -d '{
771
+ "ref": "io.b3os/stripe/get-invoice@1",
772
+ "input": {"id": "in_1Qexample0001"},
773
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
774
+ }'
775
+ ```
776
+ **TypeScript**
777
+
778
+ ```ts
779
+ import { B3OS } from "@b3os/sdk";
780
+
781
+ const b3os = new B3OS();
782
+ const result = await b3os.actions.call({
783
+ ref: "io.b3os/stripe/get-invoice@1",
784
+ input: { id: "in_1Qexample0001" },
785
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
786
+ });
787
+ console.log(result.output);
788
+ ```
789
+ **Python**
790
+
791
+ ```python
792
+ from b3os import B3OS
793
+
794
+ b3os = B3OS()
795
+ result = b3os.actions.call({
796
+ "ref": "io.b3os/stripe/get-invoice@1",
797
+ "input": {"id": "in_1Qexample0001"},
798
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
799
+ })
800
+ print(result["output"])
801
+ ```
802
+ **MCP**
803
+
804
+ ```json
805
+ {
806
+ "method": "tools/call",
807
+ "params": {
808
+ "name": "stripe__get-invoice",
809
+ "arguments": {"id": "in_1Qexample0001"}
810
+ }
811
+ }
812
+ ```
813
+
814
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__get-invoice` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
815
+
816
+ Output, labeled `fixture`: Get invoice (documented response shape, example values). From the bundle's `fixtures/get-invoice.json`, not a live call.
817
+
818
+ ```json
819
+ {
820
+ "id": "in_1Qexample0001",
821
+ "number": "B3D4F-0007",
822
+ "status": "paid",
823
+ "customer": "cus_Qexample0001",
824
+ "customer_email": "buyer@example.com",
825
+ "currency": "usd",
826
+ "total": 4900,
827
+ "amount_due": 4900,
828
+ "amount_paid": 4900,
829
+ "amount_remaining": 0,
830
+ "due_date": null,
831
+ "created": 1792970300,
832
+ "hosted_invoice_url": "https://invoice.stripe.com/i/acct_1Qexample/test_YWNjdF8x",
833
+ "invoice_pdf": "https://pay.stripe.com/invoice/acct_1Qexample/test_YWNjdF8x/pdf",
834
+ "lines": [
835
+ {
836
+ "description": "1 x Pro (at $49.00 / month)",
837
+ "amount": 4900,
838
+ "quantity": 1
839
+ }
840
+ ]
841
+ }
842
+ ```
843
+
844
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
845
+
846
+ | `pack_error.code` | Service status | Retryable | Message |
847
+ |---|---|---|---|
848
+ | `not_found` | 404 | no | built from the service's response |
849
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
850
+ | `forbidden` | 403 | no | built from the service's response |
851
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
852
+ | `invalid_request` | 400 | no | built from the service's response |
853
+
854
+ <h3 id="stripe-list-subscriptions"><code>list-subscriptions</code></h3>
855
+
856
+ **List subscriptions.** Subscriptions filtered by customer, price or status (default: everything not canceled), with status, renewal time, cancel-at-period-end flag and items (price, product, quantity, unit amount, interval).
857
+
858
+ Ref `io.b3os/stripe/list-subscriptions@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-subscriptions`
859
+
860
+ **curl**
861
+
862
+ ```bash
863
+ curl -s https://beta-api.b3os.org/v1/actions/call \
864
+ -H "Authorization: Bearer $B3OS_API_KEY" \
865
+ -H "Content-Type: application/json" \
866
+ -d '{
867
+ "ref": "io.b3os/stripe/list-subscriptions@1",
868
+ "input": {"customer": "cus_Qexample0001", "limit": 1},
869
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
870
+ }'
871
+ ```
872
+ **TypeScript**
873
+
874
+ ```ts
875
+ import { B3OS } from "@b3os/sdk";
876
+
877
+ const b3os = new B3OS();
878
+ const result = await b3os.actions.call({
879
+ ref: "io.b3os/stripe/list-subscriptions@1",
880
+ input: { customer: "cus_Qexample0001", limit: 1 },
881
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
882
+ });
883
+ console.log(result.output);
884
+ ```
885
+ **Python**
886
+
887
+ ```python
888
+ from b3os import B3OS
889
+
890
+ b3os = B3OS()
891
+ result = b3os.actions.call({
892
+ "ref": "io.b3os/stripe/list-subscriptions@1",
893
+ "input": {"customer": "cus_Qexample0001", "limit": 1},
894
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
895
+ })
896
+ print(result["output"])
897
+ ```
898
+ **MCP**
899
+
900
+ ```json
901
+ {
902
+ "method": "tools/call",
903
+ "params": {
904
+ "name": "stripe__list-subscriptions",
905
+ "arguments": {"customer": "cus_Qexample0001", "limit": 1}
906
+ }
907
+ }
908
+ ```
909
+
910
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-subscriptions` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
911
+
912
+ Output, labeled `fixture`: List subscriptions (documented response shape, example values). From the bundle's `fixtures/list-subscriptions.json`, not a live call.
913
+
914
+ ```json
915
+ {
916
+ "data": [
917
+ {
918
+ "id": "sub_1Qexample0001",
919
+ "status": "active",
920
+ "customer": "cus_Qexample0001",
921
+ "cancel_at_period_end": false,
922
+ "current_period_end": 1795648800,
923
+ "created": 1790380000,
924
+ "items": [
925
+ {
926
+ "price": "price_1Qexample0001",
927
+ "product": "prod_Qexample0001",
928
+ "quantity": 1,
929
+ "unit_amount": 4900,
930
+ "interval": "month"
931
+ }
932
+ ]
933
+ }
934
+ ],
935
+ "has_more": false
936
+ }
937
+ ```
938
+
939
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
940
+
941
+ | `pack_error.code` | Service status | Retryable | Message |
942
+ |---|---|---|---|
943
+ | `not_found` | 404 | no | built from the service's response |
944
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
945
+ | `forbidden` | 403 | no | built from the service's response |
946
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
947
+ | `invalid_request` | 400 | no | built from the service's response |
948
+
949
+ <h3 id="stripe-list-products"><code>list-products</code></h3>
950
+
951
+ **List products.** Products, newest first, optionally only active ones: name, description, active flag, default price and metadata.
952
+
953
+ Ref `io.b3os/stripe/list-products@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-products`
954
+
955
+ **curl**
956
+
957
+ ```bash
958
+ curl -s https://beta-api.b3os.org/v1/actions/call \
959
+ -H "Authorization: Bearer $B3OS_API_KEY" \
960
+ -H "Content-Type: application/json" \
961
+ -d '{
962
+ "ref": "io.b3os/stripe/list-products@1",
963
+ "input": {"active": true, "limit": 1},
964
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
965
+ }'
966
+ ```
967
+ **TypeScript**
968
+
969
+ ```ts
970
+ import { B3OS } from "@b3os/sdk";
971
+
972
+ const b3os = new B3OS();
973
+ const result = await b3os.actions.call({
974
+ ref: "io.b3os/stripe/list-products@1",
975
+ input: { active: true, limit: 1 },
976
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
977
+ });
978
+ console.log(result.output);
979
+ ```
980
+ **Python**
981
+
982
+ ```python
983
+ from b3os import B3OS
984
+
985
+ b3os = B3OS()
986
+ result = b3os.actions.call({
987
+ "ref": "io.b3os/stripe/list-products@1",
988
+ "input": {"active": True, "limit": 1},
989
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
990
+ })
991
+ print(result["output"])
992
+ ```
993
+ **MCP**
994
+
995
+ ```json
996
+ {
997
+ "method": "tools/call",
998
+ "params": {
999
+ "name": "stripe__list-products",
1000
+ "arguments": {"active": true, "limit": 1}
1001
+ }
1002
+ }
1003
+ ```
1004
+
1005
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-products` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
1006
+
1007
+ Output, labeled `fixture`: List products (documented response shape, example values). From the bundle's `fixtures/list-products.json`, not a live call.
1008
+
1009
+ ```json
1010
+ {
1011
+ "data": [
1012
+ {
1013
+ "id": "prod_Qexample0001",
1014
+ "name": "Pro",
1015
+ "description": "Pro plan",
1016
+ "active": true,
1017
+ "default_price": "price_1Qexample0001",
1018
+ "created": 1790000000,
1019
+ "metadata": {}
1020
+ }
1021
+ ],
1022
+ "has_more": false
1023
+ }
1024
+ ```
1025
+
1026
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
1027
+
1028
+ | `pack_error.code` | Service status | Retryable | Message |
1029
+ |---|---|---|---|
1030
+ | `not_found` | 404 | no | built from the service's response |
1031
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
1032
+ | `forbidden` | 403 | no | built from the service's response |
1033
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
1034
+ | `invalid_request` | 400 | no | built from the service's response |
1035
+
1036
+ <h3 id="stripe-list-prices"><code>list-prices</code></h3>
1037
+
1038
+ **List prices.** Prices, newest first, optionally for one product or only active ones: unit amount, currency, one-time or recurring interval, nickname and lookup key.
1039
+
1040
+ Ref `io.b3os/stripe/list-prices@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-prices`
1041
+
1042
+ **curl**
1043
+
1044
+ ```bash
1045
+ curl -s https://beta-api.b3os.org/v1/actions/call \
1046
+ -H "Authorization: Bearer $B3OS_API_KEY" \
1047
+ -H "Content-Type: application/json" \
1048
+ -d '{
1049
+ "ref": "io.b3os/stripe/list-prices@1",
1050
+ "input": {"product": "prod_Qexample0001", "limit": 1},
1051
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
1052
+ }'
1053
+ ```
1054
+ **TypeScript**
1055
+
1056
+ ```ts
1057
+ import { B3OS } from "@b3os/sdk";
1058
+
1059
+ const b3os = new B3OS();
1060
+ const result = await b3os.actions.call({
1061
+ ref: "io.b3os/stripe/list-prices@1",
1062
+ input: { product: "prod_Qexample0001", limit: 1 },
1063
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
1064
+ });
1065
+ console.log(result.output);
1066
+ ```
1067
+ **Python**
1068
+
1069
+ ```python
1070
+ from b3os import B3OS
1071
+
1072
+ b3os = B3OS()
1073
+ result = b3os.actions.call({
1074
+ "ref": "io.b3os/stripe/list-prices@1",
1075
+ "input": {"product": "prod_Qexample0001", "limit": 1},
1076
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
1077
+ })
1078
+ print(result["output"])
1079
+ ```
1080
+ **MCP**
1081
+
1082
+ ```json
1083
+ {
1084
+ "method": "tools/call",
1085
+ "params": {
1086
+ "name": "stripe__list-prices",
1087
+ "arguments": {"product": "prod_Qexample0001", "limit": 1}
1088
+ }
1089
+ }
1090
+ ```
1091
+
1092
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-prices` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
1093
+
1094
+ Output, labeled `fixture`: List prices (documented response shape, example values). From the bundle's `fixtures/list-prices.json`, not a live call.
1095
+
1096
+ ```json
1097
+ {
1098
+ "data": [
1099
+ {
1100
+ "id": "price_1Qexample0001",
1101
+ "product": "prod_Qexample0001",
1102
+ "active": true,
1103
+ "currency": "usd",
1104
+ "unit_amount": 4900,
1105
+ "type": "recurring",
1106
+ "interval": "month",
1107
+ "nickname": null,
1108
+ "lookup_key": "pro_monthly"
1109
+ }
1110
+ ],
1111
+ "has_more": false
1112
+ }
1113
+ ```
1114
+
1115
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
1116
+
1117
+ | `pack_error.code` | Service status | Retryable | Message |
1118
+ |---|---|---|---|
1119
+ | `not_found` | 404 | no | built from the service's response |
1120
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
1121
+ | `forbidden` | 403 | no | built from the service's response |
1122
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
1123
+ | `invalid_request` | 400 | no | built from the service's response |
1124
+
1125
+ <h3 id="stripe-list-events"><code>list-events</code></h3>
1126
+
1127
+ **List events.** Account events of the last 30 days, newest first, optionally only some types (invoice.paid, customer.subscription.deleted, charge.refunded, ...). ending_before returns only events newer than that event id.
1128
+
1129
+ Ref `io.b3os/stripe/list-events@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__list-events`
1130
+
1131
+ **curl**
1132
+
1133
+ ```bash
1134
+ curl -s https://beta-api.b3os.org/v1/actions/call \
1135
+ -H "Authorization: Bearer $B3OS_API_KEY" \
1136
+ -H "Content-Type: application/json" \
1137
+ -d '{
1138
+ "ref": "io.b3os/stripe/list-events@1",
1139
+ "input": {"types": ["invoice.paid"], "limit": 1},
1140
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
1141
+ }'
1142
+ ```
1143
+ **TypeScript**
1144
+
1145
+ ```ts
1146
+ import { B3OS } from "@b3os/sdk";
1147
+
1148
+ const b3os = new B3OS();
1149
+ const result = await b3os.actions.call({
1150
+ ref: "io.b3os/stripe/list-events@1",
1151
+ input: { types: ["invoice.paid"], limit: 1 },
1152
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
1153
+ });
1154
+ console.log(result.output);
1155
+ ```
1156
+ **Python**
1157
+
1158
+ ```python
1159
+ from b3os import B3OS
1160
+
1161
+ b3os = B3OS()
1162
+ result = b3os.actions.call({
1163
+ "ref": "io.b3os/stripe/list-events@1",
1164
+ "input": {"types": ["invoice.paid"], "limit": 1},
1165
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
1166
+ })
1167
+ print(result["output"])
1168
+ ```
1169
+ **MCP**
1170
+
1171
+ ```json
1172
+ {
1173
+ "method": "tools/call",
1174
+ "params": {
1175
+ "name": "stripe__list-events",
1176
+ "arguments": {"types": ["invoice.paid"], "limit": 1}
1177
+ }
1178
+ }
1179
+ ```
1180
+
1181
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__list-events` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
1182
+
1183
+ Output, labeled `fixture`: List events (documented response shape, example values). From the bundle's `fixtures/list-events.json`, not a live call.
1184
+
1185
+ ```json
1186
+ {
1187
+ "data": [
1188
+ {
1189
+ "id": "evt_1QexampleInvoicePaid",
1190
+ "type": "invoice.paid",
1191
+ "created": 1792970390,
1192
+ "livemode": false,
1193
+ "api_version": "2025-09-30.clover",
1194
+ "data": {
1195
+ "object": {
1196
+ "id": "in_1Qexample0001",
1197
+ "object": "invoice",
1198
+ "amount_paid": 4900,
1199
+ "currency": "usd",
1200
+ "customer": "cus_Qexample0001",
1201
+ "status": "paid"
1202
+ }
1203
+ }
1204
+ }
1205
+ ],
1206
+ "has_more": false
1207
+ }
1208
+ ```
1209
+
1210
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
1211
+
1212
+ | `pack_error.code` | Service status | Retryable | Message |
1213
+ |---|---|---|---|
1214
+ | `not_found` | 404 | no | built from the service's response |
1215
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
1216
+ | `forbidden` | 403 | no | built from the service's response |
1217
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
1218
+ | `invalid_request` | 400 | no | built from the service's response |
1219
+
1220
+ <h3 id="stripe-get-event"><code>get-event</code></h3>
1221
+
1222
+ **Get event.** One event by id, including the object it describes in data.object. Stripe keeps events for 30 days.
1223
+
1224
+ Ref `io.b3os/stripe/get-event@1.0.0` · effect `read` · connection `secret_key` · MCP tool `stripe__get-event`
1225
+
1226
+ **curl**
1227
+
1228
+ ```bash
1229
+ curl -s https://beta-api.b3os.org/v1/actions/call \
1230
+ -H "Authorization: Bearer $B3OS_API_KEY" \
1231
+ -H "Content-Type: application/json" \
1232
+ -d '{
1233
+ "ref": "io.b3os/stripe/get-event@1",
1234
+ "input": {"id": "evt_1QexampleInvoicePaid"},
1235
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"}
1236
+ }'
1237
+ ```
1238
+ **TypeScript**
1239
+
1240
+ ```ts
1241
+ import { B3OS } from "@b3os/sdk";
1242
+
1243
+ const b3os = new B3OS();
1244
+ const result = await b3os.actions.call({
1245
+ ref: "io.b3os/stripe/get-event@1",
1246
+ input: { id: "evt_1QexampleInvoicePaid" },
1247
+ connections: { secret_key: "conn_01m5t6cbgdjs1ketgcqwa2sne8" },
1248
+ });
1249
+ console.log(result.output);
1250
+ ```
1251
+ **Python**
1252
+
1253
+ ```python
1254
+ from b3os import B3OS
1255
+
1256
+ b3os = B3OS()
1257
+ result = b3os.actions.call({
1258
+ "ref": "io.b3os/stripe/get-event@1",
1259
+ "input": {"id": "evt_1QexampleInvoicePaid"},
1260
+ "connections": {"secret_key": "conn_01m5t6cbgdjs1ketgcqwa2sne8"},
1261
+ })
1262
+ print(result["output"])
1263
+ ```
1264
+ **MCP**
1265
+
1266
+ ```json
1267
+ {
1268
+ "method": "tools/call",
1269
+ "params": {
1270
+ "name": "stripe__get-event",
1271
+ "arguments": {"id": "evt_1QexampleInvoicePaid"}
1272
+ }
1273
+ }
1274
+ ```
1275
+
1276
+ Expose the pack as tools with `--packs stripe` on the local server or `?packs=stripe` on the remote URL, and the agent calls `stripe__get-event` with the action's input. The tool uses your newest connection for each key without a `subject`. Without exposing the pack, `actions_call` takes the same input with `ref`.
1277
+
1278
+ Output, labeled `fixture`: Get event (documented response shape, example values). From the bundle's `fixtures/get-event.json`, not a live call.
1279
+
1280
+ ```json
1281
+ {
1282
+ "id": "evt_1QexampleInvoicePaid",
1283
+ "type": "invoice.paid",
1284
+ "created": 1792970390,
1285
+ "livemode": false,
1286
+ "api_version": "2025-09-30.clover",
1287
+ "data": {
1288
+ "object": {
1289
+ "id": "in_1Qexample0001",
1290
+ "object": "invoice",
1291
+ "amount_paid": 4900,
1292
+ "currency": "usd",
1293
+ "customer": "cus_Qexample0001",
1294
+ "status": "paid"
1295
+ }
1296
+ }
1297
+ }
1298
+ ```
1299
+
1300
+ When the service answers with an error, the call fails with [`upstream_error`](https://docs.beta.b3os.org/errors#upstream_error) and `pack_error.code` is one of:
1301
+
1302
+ | `pack_error.code` | Service status | Retryable | Message |
1303
+ |---|---|---|---|
1304
+ | `not_found` | 404 | no | built from the service's response |
1305
+ | `connection_unauthorized` | 401 | no | Stripe rejected the API key. |
1306
+ | `forbidden` | 403 | no | built from the service's response |
1307
+ | `rate_limited` | 429 | yes | Stripe rate limit reached; retry with backoff. |
1308
+ | `invalid_request` | 400 | no | built from the service's response |
1309
+
1310
+ ## Triggers
1311
+
1312
+ <h3 id="stripe-trigger-event"><code>event</code> (trigger)</h3>
1313
+
1314
+ **Stripe event.** Fires once per new Stripe event whose type is in the subscription's types (wildcards like invoice.* work, * for all), checked every 30 seconds by default from the events list. No webhook endpoint is created in your account. The first check records the latest event and emits nothing.
1315
+
1316
+ Ref `io.b3os/stripe/event@1.0.0` · poll of `list-events`, every 30 s by default (at least 10 s) · connection `secret_key`
1317
+
1318
+ | `with` key | Required | Description |
1319
+ |---|---|---|
1320
+ | `types` | yes | Event types, for example invoice.paid, or * for all. |
1321
+
1322
+ In a routine:
1323
+
1324
+ ```yaml
1325
+ triggers:
1326
+ - type: action
1327
+ id: event
1328
+ uses: io.b3os/stripe/event@1
1329
+ with:
1330
+ types:
1331
+ - invoice.paid
1332
+ connections:
1333
+ secret_key: conn_01m5t6cbgdjs1ketgcqwa2sne8
1334
+ ```
1335
+
1336
+ Event, labeled `fixture`: the first item of `list-events`'s fixture fixtures/list-events.json (List events (documented response shape, example values)) through the trigger's event mapping. A routine reads it as `trigger.data`; its fields are `id`, `type`, `created`, `livemode`, `api_version`, `data`.
1337
+
1338
+ ```json
1339
+ {
1340
+ "id": "evt_1QexampleInvoicePaid",
1341
+ "type": "invoice.paid",
1342
+ "created": 1792970390,
1343
+ "livemode": false,
1344
+ "api_version": "2025-09-30.clover",
1345
+ "data": {
1346
+ "object": {
1347
+ "id": "in_1Qexample0001",
1348
+ "object": "invoice",
1349
+ "amount_paid": 4900,
1350
+ "currency": "usd",
1351
+ "customer": "cus_Qexample0001",
1352
+ "status": "paid"
1353
+ }
1354
+ }
1355
+ }
1356
+ ```
1357
+
1358
+ <h3 id="stripe-trigger-webhook-event"><code>webhook-event</code> (trigger)</h3>
1359
+
1360
+ **Stripe event (webhook).** Fires as Stripe delivers events to a webhook endpoint you add in the Stripe Dashboard (Developers, Webhooks) with this subscription's URL; paste that endpoint's signing secret (whsec_...) when you create the subscription. Every delivery's Stripe-Signature is verified and must be at most 5 minutes old. Only the types you list (or * for all) and types under the prefixes you list (customer.subscription. for every subscription event) are emitted. Faster than the polled event trigger; the pack itself still never writes to Stripe.
1361
+
1362
+ Ref `io.b3os/stripe/webhook-event@1.0.0` · webhook, signature scheme `stripe` with a signing secret you bind as `webhook_secret` · connection `webhook_secret`
1363
+
1364
+ | `with` key | Required | Description |
1365
+ |---|---|---|
1366
+ | `types` | no | Event types to emit, for example invoice.paid, or * for all. Default `[]`. |
1367
+ | `type_prefixes` | no | Also emit every type starting with one of these, for example customer.subscription. or invoice. Default `[]`. |
1368
+
1369
+ In a routine:
1370
+
1371
+ ```yaml
1372
+ triggers:
1373
+ - type: action
1374
+ id: webhook_event
1375
+ uses: io.b3os/stripe/webhook-event@1
1376
+ with:
1377
+ types:
1378
+ - invoice.paid
1379
+ type_prefixes:
1380
+ - customer.subscription.
1381
+ connections:
1382
+ webhook_secret: conn_01m5t6cbgdjs1ketgcqwa2sne8
1383
+ ```
1384
+
1385
+ Event, labeled `fixture`: the recorded delivery in fixtures/webhook-event-invoice-paid.json (Stripe event (webhook) (delivery signed with a throwaway test secret)). A routine reads it as `trigger.data`; its fields are `id`, `type`, `created`, `livemode`, `api_version`, `data`.
1386
+
1387
+ ```json
1388
+ {
1389
+ "id": "evt_1QexampleInvoicePaid",
1390
+ "type": "invoice.paid",
1391
+ "created": 1792970390,
1392
+ "livemode": false,
1393
+ "api_version": "2025-09-30.clover",
1394
+ "data": {
1395
+ "object": {
1396
+ "id": "in_1Qexample0001",
1397
+ "object": "invoice",
1398
+ "amount_paid": 4900,
1399
+ "currency": "usd",
1400
+ "customer": "cus_Qexample0001",
1401
+ "status": "paid"
1402
+ }
1403
+ }
1404
+ }
1405
+ ```