Integrations / Stripe
Stripe
Payments data, read only: balance, charges, payouts, customers, invoices, subscriptions and balance transactions.
9 actions
API key
9 read0 write
Calls api.stripe.com
Connect
const conn = await setu.connections.initiate({ userId: "user_1", toolkit: "stripe" });
console.log(conn.connectUrl); // show this to your user
await conn.waitUntilActive();Permissions requested
This toolkit uses a single credential and requests no scopes.
Actions
Get balancereadstripe.get_balanceRetrieve the current Stripe account balance: available and pending amounts per currency.
No input.
await setu.execute({
userId: "user_1",
action: "stripe.get_balance",
input: {},
});Get chargereadstripe.get_chargeRetrieve one charge by id, including status, amount, refund state and its balance transaction.
| Input | Type | Description | |
|---|---|---|---|
charge_id | string | Required | Charge id, e.g. ch_... |
await setu.execute({
userId: "user_1",
action: "stripe.get_charge",
input: {
"charge_id": "<charge_id>"
},
});Get customerreadstripe.get_customerRetrieve one customer by id.
| Input | Type | Description | |
|---|---|---|---|
customer_id | string | Required | Customer id, e.g. cus_... |
await setu.execute({
userId: "user_1",
action: "stripe.get_customer",
input: {
"customer_id": "<customer_id>"
},
});List balance transactionsreadstripe.list_balance_transactionsList balance transactions (charges, fees, payouts, refunds) that make up the Stripe balance, newest first.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Number of objects to return (1 to 100, default 10) |
starting_after | string | Optional | Object id to start after, for the next page |
type | string | Optional | Only this transaction type, e.g. charge, payout, refund |
await setu.execute({
userId: "user_1",
action: "stripe.list_balance_transactions",
input: {},
});List chargesreadstripe.list_chargesList charges, newest first, optionally for one customer. Amounts are in the smallest currency unit (cents).
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Number of objects to return (1 to 100, default 10) |
starting_after | string | Optional | Object id to start after, for the next page |
customer | string | Optional | Only charges for this customer id |
await setu.execute({
userId: "user_1",
action: "stripe.list_charges",
input: {},
});List customersreadstripe.list_customersList customers, newest first, optionally filtered by exact email address.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Number of objects to return (1 to 100, default 10) |
starting_after | string | Optional | Object id to start after, for the next page |
email | string | Optional | Only customers with exactly this email |
await setu.execute({
userId: "user_1",
action: "stripe.list_customers",
input: {},
});List invoicesreadstripe.list_invoicesList invoices, newest first, optionally for one customer or status.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Number of objects to return (1 to 100, default 10) |
starting_after | string | Optional | Object id to start after, for the next page |
customer | string | Optional | Only invoices for this customer id |
status | string | Optional | Invoice status |
await setu.execute({
userId: "user_1",
action: "stripe.list_invoices",
input: {},
});List payoutsreadstripe.list_payoutsList payouts to the connected bank account, newest first, optionally filtered by status.
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Number of objects to return (1 to 100, default 10) |
starting_after | string | Optional | Object id to start after, for the next page |
status | string | Optional | Payout status |
await setu.execute({
userId: "user_1",
action: "stripe.list_payouts",
input: {},
});List subscriptionsreadstripe.list_subscriptionsList subscriptions, optionally for one customer or status (canceled and ended ones need status=all or canceled).
| Input | Type | Description | |
|---|---|---|---|
limit | integer | Optional | Number of objects to return (1 to 100, default 10) |
starting_after | string | Optional | Object id to start after, for the next page |
customer | string | Optional | Only subscriptions for this customer id |
status | string | Optional | Subscription status |
await setu.execute({
userId: "user_1",
action: "stripe.list_subscriptions",
input: {},
});