Stripe
Read and create core Stripe data — customers, charges, subscriptions, and invoices — straight from the Stripe REST API. Pure Python standard library, no third-party dependencies.
Grounded in the official Stripe API reference: https://docs.stripe.com/api
- Base URL:
https://api.stripe.com - Auth: HTTP Basic, with your secret key as the username and an empty
password (
Authorization: Basic base64("<sk_...>:")). - Bodies: Stripe takes form-encoded request bodies and returns JSON.
Operations
| operation | HTTP call | Params used |
|---|---|---|
list_customers |
GET /v1/customers?limit=N |
limit |
get_customer |
GET /v1/customers/{customerId} |
customerId |
create_customer |
POST /v1/customers |
email, name |
list_charges |
GET /v1/charges?limit=N |
limit |
list_subscriptions |
GET /v1/subscriptions?limit=N |
limit |
list_invoices |
GET /v1/invoices?limit=N |
limit |
limit is clamped to Stripe's accepted range of 1–100 (default 10).
Inputs
| input | required | description |
|---|---|---|
apiKey |
yes | Stripe secret key (sk_test_… or sk_live_…). |
operation |
yes | One of the operations above. |
customerId |
no | Customer id (cus_…); required for get_customer. |
email |
no | Customer email; used by create_customer. |
name |
no | Customer name; used by create_customer. |
limit |
no | Page size for list operations (1–100, default 10). |
Outputs
result— the Stripe response payload as a JSON string (re-serialized compactly when it parses as JSON).status— the HTTP status code as a string. Stripe error bodies on 4xx/5xx are returned inresultwith the correspondingstatusrather than failing the step; only transport-level failures (DNS, timeout, refused) fail the step.
Getting your API key
- Sign in to the Stripe Dashboard.
- Under Developers → API keys, copy your Secret key.
- Use a
sk_test_…key while developing; switch tosk_live_…for production. Never embed the key in client-side code.
Usage examples
List the 5 most recent customers:
stripe apiKey=sk_test_xxx operation=list_customers limit=5
Create a customer:
stripe apiKey=sk_test_xxx operation=create_customer [email protected] name="Ada Lovelace"
Retrieve one customer by id:
stripe apiKey=sk_test_xxx operation=get_customer customerId=cus_NffrFeUfNV2Hib
List recent invoices:
stripe apiKey=sk_test_xxx operation=list_invoices limit=10