Skip to content

Stripe Charge

Stripe Charge works with the charges in your Stripe account. It can create a new charge to a customer or a card, look up one charge or the list of charges, and change the description of a charge.

For payments that need the customer’s confirmation, or that you want to hold and collect later, use Stripe Payment Intent.

When to use it

  • You want to charge a customer who already has a card saved in Stripe when something happens in your flow.
  • You want to review a customer’s latest charges to answer a question.
  • You want to look up a specific charge to see whether it went through.
  • You want to add a description to a charge so it is easier to identify in Stripe.

Configuration

You need a Stripe API credential with the secret key of your Stripe account. See Credentials.

FieldWhat it does
Credential (required)The Stripe API credential of your account.
Operation (required)The action the component performs. Defaults to Create. See Operations.
Get ModeOnly in Get. By ID looks up one charge; All returns the list of charges. Defaults to By ID.
Charge IDThe charge’s identifier in Stripe (starts with ch_). Required in Get with By ID and in Update.
Customer IDThe customer’s identifier in Stripe (starts with cus_). In Create, charges the customer’s default payment method. In Get with All, shows only that customer’s charges.
AmountThe amount in the smallest unit of the currency, for example cents: 1000 is 10.00. Required in Create.
CurrencyThe currency of the charge, such as eur or usd. Defaults to usd. Only in Create.
Source TokenOnly in Create. A Stripe card token (starts with tok_). Payment methods that start with pm_ are not accepted; use Stripe Payment Intent for those.
DescriptionFree text saved with the charge. In Create and Update.
LimitOnly in Get with All. Maximum number of charges returned, between 1 and 100. Defaults to 100.

In Create you must fill in at least Customer ID or Source Token.

Operations

  • Create: creates a charge for the given amount and currency, to the customer or to the token’s card.
  • Get: with By ID returns one charge; with All returns the list of charges, for one customer if you give one.
  • Update: changes the description of an existing charge.

Output

The Data output returns the charge that was created, looked up or updated. With Get and All, it returns one item per charge found. Each item includes the identifier, amount, currency and status of the charge, among other Stripe details.

You can connect it to a component that stores the result, to a message for the customer or to a condition that checks the status. The component can also be connected to an Agent as a tool, so the agent decides when to use it. See Tool Mode.

Example

A training school charges the enrolment fee to students who already have a card saved in Stripe.

  1. Add Stripe Charge with Operation set to Create.
  2. In Customer ID, pass the student’s Stripe identifier coming from the enrolment form.
  3. Set Amount to 25000 and Currency to eur to charge 250.00 EUR.
  4. In Description, write “Autumn course enrolment”.
  5. Connect the Data output to a confirmation email for the student.

Good practices

  • Test your flows with Stripe’s test key before you use the live key.
  • Remember that amounts are in cents: a wrong amount is really charged with the live key.