Summary: ◀▼
You can connect action flows to Stripe using API keys to automate tasks like creating, updating, and searching customers, managing subscriptions, and handling invoices. Use a dedicated service account for connections and restrict API key permissions. This integration helps streamline customer and billing management by enabling you to perform Stripe actions directly within your workflows.
Connecting Stripe to action builder
Before you can include external actions in your action flows, you must connect the action builder to the external system.
- All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it's a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
- All integrations request access to necessary scopes. However, it's important that you review and validate the scopes before authorizing the connection to the external system.
- When managing credentials for API key-based tools, such as OpenAI, it's best to store keys in a secure vault or credential manager.
To create an API key
The Stripe connection uses an API key for authentication. You can generate an API key in your Stripe Dashboard under Developers > API keys. See the Stripe documentation for details.
- In Admin Center, click
Apps and integrations in the sidebar, then select Actions > Action
flows. - Create or edit an action flow.
- Open the step sidebar.
- Under External actions, click Stripe.
- Click Connect.
- Follow Stripe's prompts to enter your Stripe access token and complete the
connection.Note: All external actions performed by an action flow are attributed to the user who connected the external system. Therefore, it is a best practice to use a dedicated service account rather than personal credentials when connecting to each external system.
After you've connected to the system, you'll see an indicator that it's connected and details about the instance you're connected to, as well as the actions available for Stripe.
Using Stripe actions in action flows
Creating a customer
Use the Create customer action to create a new customer record in Stripe.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: EmailOptional:
Metadata accepts JSON format for custom key-value pairs. |
| Output | Customer details including ID, email, name, creation timestamp, and object type. |
Updating a customer
Use the Update customer action to update an existing customer's information.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Customer IDOptional:
|
| Output | Updated customer details including ID, email, name, and object type. |
Looking up a customer
Use the Lookup customer action to retrieve complete details for a specific customer.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Customer ID
|
| Output | Customer details including ID, email, name, phone, description, balance, currency, default payment source, creation timestamp, and metadata. |
Searching for customers
Use the Search customer action to find customers matching search criteria.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: QueryQuery uses Stripe search syntax (for example, email:'user@example.com' or metadata['key']:'value'). See Stripe search query language documentation for complete syntax. Optional:
|
| Output | Array of customer objects with total count, containing customer IDs, emails, names, and creation timestamps. |
Canceling a subscription
Use the Cancel subscription action to cancel an active subscription.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Subscription IDOptional:
Cancel at period end options are Yes or No. Selecting Yes schedules cancellation at the end of the current billing period. |
| Output | Subscription details including ID, status, cancellation timestamps, and billing period information. |
Creating an invoice
Use the Create invoice action to create a new invoice for a customer.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Customer IDOptional:
Auto advance, Collection method, and Pending invoice items behavior are dropdown fields with predefined options. Currency uses three-letter ISO codes (e.g., USD, EUR, GBP). |
| Output | Invoice details including ID, customer, status, amounts, currency, invoice number, hosted invoice URL, PDF link, and timestamps. |
Looking up an invoice
Use the Lookup invoice action to retrieve complete details for a specific invoice.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: Invoice ID
|
| Output | Invoice details including ID, customer, status, currency, collection method, amounts due/paid/remaining, subtotal, total, invoice number, hosted URL, PDF link, due date, and period timestamps. |
Searching for invoices
Use the Search invoice action to find invoices matching search criteria.
This action has the following inputs and outputs:
| Variables | |
|---|---|
| Inputs | Required: QueryOptional:
Query uses Stripe search syntax (e.g., customer:'cus_ABC123' or metadata['key']:'value'). See Stripe search query language documentation for complete syntax. |
| Output | Array of invoice objects with total count and pagination status, containing invoice IDs, customer IDs, status, amounts, currency, creation timestamps, and URLs. |