Stripe
Create payment intents, manage customers, invoices, and subscriptions with Stripe.
On this page
- Connect
- Call it from a workflow
- Actions (19)
- create_customer
- create_invoice
- create_payment_intent
- cancel_subscription
- create_payment_link
- create_price
- create_product
- create_refund
- create_subscription
- custom_api_call
- deactivate_payment_link
- find_invoice
- retrieve_customer
- retrieve_invoice
- retrieve_payment_intent
- retrieve_payout
- search_customer
- search_subscriptions
- update_customer
- Env keys
- Details
Connect
Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("stripe", "create_customer", {
"email": "<email>",
"name": "<name>"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("Stripe answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "stripe-create-customer",
name: "Stripe: Create Customer",
description: "Calls Stripe when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("stripe", {
"action": "create_customer",
"email": "<email>",
"name": "<name>"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/stripe/create_customer" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"email":"<email>","name":"<name>"}}'Actions
create_customerin catalog
Create Customer. Create a customer in stripe
| Input | Type | Description |
|---|---|---|
emailrequired | text | |
namerequired | text | Name |
descriptionoptional | long text | Description |
phoneoptional | text | Phone |
line1optional | text | Address Line 1 |
postal_codeoptional | text | Postal Code |
cityoptional | text | City |
stateoptional | text | State |
countryoptional | text | Country |
create_invoicein catalog
Create Invoice. Create an Invoice in stripe
| Input | Type | Description |
|---|---|---|
customer_idrequired | text | Stripe Customer ID |
currencyrequired | text | Currency for the invoice (e.g., USD) |
descriptionoptional | long text | Description for the invoice |
create_payment_intentin catalog
Create Payment (Payment Intent). Creates a new payment intent to start a payment flow.
| Input | Type | Description |
|---|---|---|
amountrequired | number | The amount to charge, in a decimal format (e.g., 10.50 for $10.50). |
currencyrequired | one of "usd" | "eur" | "gbp" | "aud" | "cad" | "chf" | "cny" | "jpy" | "inr" | "sgd" | The three-letter ISO code for the currency. |
customerrequired | id (picked from your account) | Customer |
payment_methodoptional | text | The ID of the Payment Method to attach (e.g., `pm_...`). Required if you want to confirm the payment immediately. |
confirmoptional | boolean | If true, Stripe will attempt to charge the provided payment method. A `Payment Method ID` is required. |
return_urloptional | text | The URL to redirect your customer back to after they authenticate their payment. Required when confirming the payment. |
descriptionoptional | long text | Description |
receipt_emailoptional | text | The email address to send a receipt to. This will override the customer's email address. |
cancel_subscription
Cancel Subscription. Cancel an existing subscription, either immediately or at the end of the current billing period.
| Input | Type | Description |
|---|---|---|
subscriptionrequired | id (picked from your account) | Subscription |
cancel_at_period_endoptional | boolean | If true, the subscription remains active until the end of the current billing period. If false, it cancels immediately. |
create_payment_link
Create Payment Link. Creates a shareable, Stripe-hosted payment link for one-time purchases or subscriptions.
| Input | Type | Description |
|---|---|---|
line_itemsrequired | array | The products and quantities to include in the payment link. |
after_completion_typeoptional | one of "hosted_confirmation" | "redirect" | Controls the behavior after the purchase is complete. Defaults to showing Stripe's hosted confirmation page. |
after_completion_redirect_urloptional | text | The URL to redirect the customer to after a successful purchase. Only used if the behavior is set to "Redirect to URL". |
allow_promotion_codesoptional | boolean | Enables the user to enter a promotion code on the Payment Link page. |
billing_address_collectionoptional | one of "auto" | "required" | Describes whether Checkout should collect the customer’s billing address. |
metadataoptional | JSON | Metadata |
create_price
Create Price. Create a price (one-time or recurring), associated with a product.
| Input | Type | Description |
|---|---|---|
productrequired | id (picked from your account) | Product |
unit_amountrequired | number | The price amount as a decimal, for example, 25.50 for $25.50. |
currencyrequired | one of "usd" | "eur" | "gbp" | "inr" | "aud" | "cad" | "chf" | "cny" | "jpy" | "sgd" | The three-letter ISO code for the currency. |
recurring_intervalrequired | one of "one_time" | "day" | "week" | "month" | "year" | Specify the billing frequency. Select 'One-Time' for a single, non-recurring payment. |
recurring_interval_countoptional | number | The number of intervals between subscription billings (e.g., for billing every 3 months, set Interval to Monthly and Interval Count to 3). Only used for recurring prices. |
create_product
Create Product. Create a new product object in Stripe.
| Input | Type | Description |
|---|---|---|
namerequired | text | The product’s name, meant to be displayable to the customer. |
descriptionoptional | long text | The product’s description, meant to be displayable to the customer. |
activeoptional | boolean | Whether the product is currently available for purchase. Defaults to true. |
imagesoptional | array | A list of up to 8 URLs of images for this product. |
urloptional | text | A publicly-accessible online page for this product. |
metadataoptional | JSON | A set of key-value pairs to store additional information about the product. |
create_refund
Create a Refund. Create a full or partial refund for a payment.
| Input | Type | Description |
|---|---|---|
payment_intentrequired | id (picked from your account) | Payment Intent |
amountoptional | number | The amount to refund (e.g., 12.99). If left blank, a full refund will be issued. |
reasonoptional | one of "duplicate" | "fraudulent" | "requested_by_customer" | An optional reason for the refund. |
metadataoptional | JSON | A set of key-value pairs to store additional information about the refund. |
create_subscription
Create Subscription. Start a subscription for a customer with specified items/prices.
| Input | Type | Description |
|---|---|---|
customerrequired | id (picked from your account) | Customer |
itemsrequired | array | A list of prices to subscribe the customer to. |
collection_methodoptional | one of "charge_automatically" | "send_invoice" | How to collect payment. 'charge_automatically' will try to bill the default payment method. 'send_invoice' will email an invoice. |
days_until_dueoptional | number | Number of days before an invoice is due. Required if Collection Method is 'Send Invoice'. |
trial_period_daysoptional | number | Integer representing the number of trial days the customer receives before the subscription bills for the first time. |
default_payment_methodoptional | text | ID of the default payment method for the subscription (e.g., `pm_...`). |
metadataoptional | JSON | Metadata |
custom_api_call
Custom API Call. Make a custom API call to a specific endpoint
| Input | Type | Description |
|---|---|---|
urlrequired | object (depends on other props) | url |
methodrequired | one of "GET" | "POST" | "PATCH" | "PUT" | "DELETE" | "HEAD" | Method |
headersrequired | object | Authorization headers are injected automatically from your connection. |
queryParamsrequired | object | Query Parameters |
body_typeoptional | one of "none" | "json" | "form_data" | "raw" | Body Type |
bodyoptional | object (depends on other props) | Body |
response_is_binaryoptional | boolean | Enable for files like PDFs, images, etc. |
failsafeoptional | boolean | No Error on Failure |
timeoutoptional | number | Timeout (in seconds) |
followRedirectsoptional | boolean | Follow redirects |
deactivate_payment_link
Deactivate Payment Link. Disable or deactivate a Payment Link so it can no longer be used.
| Input | Type | Description |
|---|---|---|
payment_link_idrequired | id (picked from your account) | Payment Link |
find_invoice
Find Invoice. Finds an invoice by its unique ID.
| Input | Type | Description |
|---|---|---|
invoice_idrequired | id (picked from your account) | Invoice |
retrieve_customer
Retrieve Customer. Retrieve a customer in stripe by id
| Input | Type | Description |
|---|---|---|
idrequired | text | ID |
retrieve_invoice
Retrieve an Invoice. Retrieves the details of an existing invoice by its ID.
| Input | Type | Description |
|---|---|---|
invoice_idrequired | id (picked from your account) | Invoice |
retrieve_payment_intent
Find Payment (by Payment Intent ID). Retrieves the details of a payment by its unique Payment Intent ID.
| Input | Type | Description |
|---|---|---|
payment_intent_idrequired | id (picked from your account) | Payment Intent |
retrieve_payout
Retrieve a Payout. Retrieves the details of an existing payout by its ID.
| Input | Type | Description |
|---|---|---|
payout_idrequired | id (picked from your account) | Payout |
search_customer
Search Customer. Search for a customer in stripe by email
| Input | Type | Description |
|---|---|---|
emailrequired | text |
search_subscriptions
Search Subscriptions. Search for subscriptions by price ID, status, customer ID and other filters, including customer details
| Input | Type | Description |
|---|---|---|
price_idsoptional | long text | Comma-separated list of price IDs to filter by (e.g., price_1ABC123, price_2DEF456) |
statusoptional | one of "" | "active" | "past_due" | "unpaid" | "canceled" | "incomplete" | "incomplete_expired" | "trialing" | "paused" | Filter by subscription status |
customer_idoptional | text | Filter by specific customer ID (optional) |
created_afteroptional | date-time (ISO) | Filter subscriptions created after this date (YYYY-MM-DD format) |
created_beforeoptional | date-time (ISO) | Filter subscriptions created before this date (YYYY-MM-DD format) |
limitoptional | number | Maximum number of subscriptions to return (default: 100, set to 0 for all) |
fetch_alloptional | boolean | Fetch all matching subscriptions (ignores limit, may take longer for large datasets) |
include_customer_detailsoptional | boolean | Fetch detailed customer information for each subscription |
update_customer
Update Customer. Modify an existing customer’s details.
| Input | Type | Description |
|---|---|---|
customerrequired | id (picked from your account) | Customer |
emailoptional | text | |
nameoptional | text | Name |
descriptionoptional | long text | Description |
phoneoptional | text | Phone |
line1optional | text | Address Line 1 |
postal_codeoptional | text | Postal Code |
cityoptional | text | City |
stateoptional | text | State |
countryoptional | text | Country |
Env keys
When connected, these credential fields are exposed to the project's runtime as environment variables (Stripe payments and subscriptions.). Server keys never reach the browser.
| Variable | Field | Where |
|---|---|---|
STRIPE_SECRET_KEY | secretKey | server only |
VITE_STRIPE_PUBLISHABLE_KEY | publishableKey | browser (VITE_) |
Details
- Id
stripe- Category
- Finance and payments
- Tags
- payments, billing, subscriptions, invoicing
- Package
@activepieces/piece-stripe@0.6.7- Tier
- Built in