Stripe

1. Overview

Stripe is a leading global online payment processing platform that provides software and services for businesses of all sizes to accept payments, send payouts, and manage their business online. It is known for its powerful API and developer-friendly features.

With GoInsight's Stripe node, you can seamlessly integrate powerful payment functionalities into your automated workflows, enabling comprehensive management of core payment resources. This allows you to automate key business processes such as handling customers, payments, coupons, and more, including:

  • Customer Management: Automatically create, query, update, and delete customer information.
  • Payment Processing: Create modern Payment Intents to handle transactions that require extra verification steps, or directly manage traditional Charges.
  • Payment Method Management: Add, query, or remove payment methods like bank cards for customers.
  • Marketing & Discounts: Dynamically create and query coupons to support your marketing campaigns.
  • Account Inquiry: Get real-time balance information for your Stripe account.

2. Prerequisites

Before using this node, you need to meet the following conditions:

  • You must have a valid Stripe account.
  • You need to obtain your API key (Secret Key) from the Stripe Developer Dashboard for credential configuration. You may need administrator privileges to access and manage API keys.

3. Credentials

For a detailed guide on how to obtain and configure credentials, please refer to our official documentation: Credential Configuration Guide.

4. Supported Operations

Summary

This Stripe node primarily operates on core resources such as account balance, charges, coupons, customers, payment methods, and sources. The table below summarizes all supported operations:

Resource Operation Description
Balance Get Stripe Balance Retrieves the current balance of your Stripe account, including available and pending amounts for all currencies.
Charge Get Stripe Charges Retrieves Stripe charge records, supporting fetching a single charge by ID or multiple charges via filtering and pagination.
Charge Update Stripe Charge Updates specified charge information, including description, metadata, receipt email, and shipping details.
Coupon Create Stripe Coupon Creates a new Stripe coupon, supporting percentage or fixed amount discounts with configurable duration, redemption limits, etc.
Coupon Get Stripe Coupons Retrieves Stripe coupons, supporting fetching a single coupon by ID or multiple coupons via filtering and pagination.
Customer Create Stripe Customer Creates a new Stripe customer, which can include an email, name, and other optional information.
Customer Get Stripe Customers Retrieves Stripe customers, supporting fetching single or multiple customers by ID, or a list of customers via filtering and pagination.
Customer Update Stripe Customer Updates specified customer information, including email, name, phone, description, and metadata.
Customer Delete Stripe Customers Deletes one or more Stripe customers.
Customer Card Add Stripe Customer Card Adds a new payment method (card) to a specified Stripe customer.
Customer Card Get Stripe Customer Cards Retrieves a list of payment methods (cards) for a specified Stripe customer.
Customer Card Delete Stripe Customer Card Deletes a payment method (card) from a specified Stripe customer.
Payment Intent Create Stripe Payment Intent Creates a new Payment Intent for handling modern payment flows that require extra verification steps (like 3DS).
Source Create Stripe Source Creates a new payment source, supporting cards, bank accounts, and various other payment methods.
Source Get Stripe Source Retrieves the details of an existing payment source by its ID.
Source Delete Stripe Source Deletes a specified payment source.

Operation Details

Get Stripe Balance

Retrieves the current balance of your Stripe account, including available and pending amounts for all currencies.

Output:

  • BalanceData (string): The full balance data returned from the Stripe API, in JSON string format.
  • Available (string-array): An array of available balance amounts by currency, with each element as a JSON string.
  • Pending (string-array): An array of pending balance amounts by currency, with each element as a JSON string.
  • ConnectReserved (string-array): An array of Connect reserved balance amounts by currency, with each element as a JSON string.
  • InstantAvailable (string-array): An array of instant available balance amounts by currency, with each element as a JSON string.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Get Stripe Charges

Retrieves Stripe charge records, supporting fetching a single charge by ID or multiple charges via filtering and pagination.

Options:

  • ChargeId: The specific charge ID to retrieve. If provided, only this charge will be retrieved. Leave empty to get multiple charges.
  • Limit: The number of charges to retrieve (1-100). Used only when ChargeId is empty. Defaults to 10.
  • StartingAfter: For pagination, specifies the charge ID to start retrieving after.
  • EndingBefore: For pagination, specifies the charge ID to end retrieving before.
  • CustomerId: Filters charge records by customer ID.
  • PaymentIntentId: Filters charge records by payment intent ID.
  • Created: Filters by creation date. This is a JSON object with keys like 'gte', 'lte', 'gt', 'lt' and Unix timestamp values.

Output:

  • Charges (string-array): An array of charge objects retrieved from Stripe, with each element as a JSON string.
  • ChargeData (string): The full charge data returned from the Stripe API, in JSON string format.
  • TotalCount (number): The number of charges returned in this response.
  • HasMore (bool): Indicates if there are more charge records available for pagination.
  • NextCursor (string): The cursor for retrieving the next page of results.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Update Stripe Charge

Updates specified charge information, including description, metadata, receipt email, and shipping details. Only fields with provided values will be updated.

Input Parameters:

  • ChargeId: The ID of the charge to update (e.g., ch_1234567890).

Options:

  • Description: The updated description for the charge.
  • ReceiptEmail: The email address for sending the receipt.
  • Metadata: Custom metadata, in JSON string format (e.g., {"order_id": "12345", "customer_name": "John Doe"}).
  • ShippingName: The recipient's name for shipping.
  • ShippingAddress: The shipping address, in JSON string format (e.g., {"line1": "123 Main St", "city": "New York", "state": "NY", "postal_code": "10001", "country": "US"}).

Output:

  • Charge (string): The updated charge object returned from Stripe, in JSON string format.
  • ChargeId (string): The ID of the updated charge.
  • Amount (number): The charge amount in the smallest currency unit (e.g., cents).
  • Currency (string): The three-letter ISO currency code.
  • Description (string): The updated description of the charge.
  • ReceiptEmail (string): The email address for sending the receipt.
  • Metadata (object): Custom metadata associated with the charge.
  • Status (string): The status of the charge (succeeded, pending, failed).
  • Created (number): The Unix timestamp of when the charge was created.
  • Message (string): A success message indicating the result of the update.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Create Stripe Coupon

Creates a new Stripe coupon, supporting percentage or fixed amount discounts with configurable duration, redemption limits, etc.

Options:

  • PercentOff: A percentage discount (1-100). Either this or AmountOff must be provided.
  • AmountOff: A fixed amount discount in the smallest currency unit (e.g., cents). Either this or PercentOff must be provided.
  • Currency: The currency for AmountOff. Required if AmountOff is used. A three-letter ISO code (e.g., usd, eur).
  • Duration: The duration of the discount: 'forever', 'once', or 'repeating'. Defaults to 'once'.
  • Name: The coupon name displayed to customers.

Output:

  • Coupon (string): The full coupon object returned from Stripe, in JSON string format.
  • CouponId (string): The ID of the created coupon.
  • Message (string): A success message indicating the result of the creation.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Get Stripe Coupons

Retrieves Stripe coupons, supporting fetching a single coupon by ID or multiple coupons via filtering and pagination.

Options:

  • CouponId: The specific coupon ID to retrieve. If provided, only this coupon will be retrieved. Leave empty to get multiple coupons.
  • Limit: The number of coupons to retrieve (1-100). Used only when CouponId is empty. Defaults to 10.
  • StartingAfter: For pagination, specifies the coupon ID to start retrieving after.
  • EndingBefore: For pagination, specifies the coupon ID to end retrieving before.
  • Created: Filters by creation date. This is a JSON object with keys like 'gte', 'lte', 'gt', 'lt' and Unix timestamp values.

Output:

  • Coupons (string-array): An array of coupon objects retrieved from Stripe, with each element as a JSON string.
  • CouponData (string): The full coupon data returned from the Stripe API, in JSON string format.
  • TotalCount (number): The number of coupons returned in this response.
  • HasMore (bool): Indicates if there are more coupon records available for pagination.
  • NextCursor (string): The cursor for retrieving the next page of results.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Create Stripe Customer

Creates a new Stripe customer, which can include an email, name, and other optional information.

Options:

  • Email: The customer's email address. Either Email or Name must be provided.
  • Name: The customer's full name. Either Email or Name must be provided.
  • Phone: The customer's phone number.
  • Description: A description for the customer.
  • Metadata: Custom metadata, in JSON string format (e.g., {"user_id": "12345", "plan": "premium"}).

Output:

  • Customer (string): The full customer object returned from Stripe, in JSON string format.
  • CustomerId (string): The ID of the created customer.
  • Message (string): A success message indicating the result of the creation.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Get Stripe Customers

Retrieves Stripe customers, supporting fetching single or multiple customers by ID, or a list of customers via filtering and pagination.

Options:

  • CustomerIds: The customer ID(s) to retrieve. Provide one ID for a single retrieval (e.g., cus_1234567890). For multiple, provide a list of IDs separated by commas (,). Leave empty to get all customers via pagination.
  • Email: Filters customers by email address.
  • Limit: The number of customers to retrieve (1-100). Used only when CustomerIds is empty. Defaults to 10.
  • StartingAfter: For pagination, specifies the customer ID to start retrieving after.
  • EndingBefore: For pagination, specifies the customer ID to end retrieving before.
  • Created: Filters by creation date. This is a JSON object with keys like 'gte', 'lte', 'gt', 'lt' and Unix timestamp values.

Output:

  • Customers (string-array): An array of customer objects retrieved from Stripe, with each element as a JSON string.
  • CustomerData (string): The full customer data returned from the Stripe API, in JSON string format.
  • TotalCount (number): The number of customers returned in this response.
  • HasMore (bool): Indicates if there are more customer records available for pagination.
  • NextCursor (string): The cursor for retrieving the next page of results.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Update Stripe Customer

Updates specified customer information, including email, name, phone, description, and metadata. Only fields with provided values will be updated.

Input Parameters:

  • CustomerId: The ID of the customer to update (e.g., cus_1234567890).

Options:

  • Email: The updated customer email address.
  • Name: The updated customer name.
  • Phone: The updated customer phone number.
  • Description: The updated customer description.
  • Metadata: Custom metadata, in JSON string format (e.g., {"user_id": "12345", "plan": "premium"}).

Output:

  • Customer (string): The updated customer object returned from Stripe, in JSON string format.
  • CustomerId (string): The ID of the updated customer.
  • Message (string): A success message indicating the result of the update.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Delete Stripe Customers

Deletes one or more Stripe customers.

Input Parameters:

  • CustomerIds: The customer ID(s) to delete. Provide one ID for a single deletion (e.g., cus_1234567890). For multiple, provide a list of IDs separated by commas (,).

Output:

  • DeletedCustomers (string-array): An array of successfully deleted customer IDs.
  • SuccessCount (number): The number of successfully deleted customers.
  • FailureCount (number): The number of customers that failed to be deleted.
  • Results (string): Detailed results for each deletion attempt.
  • Message (string): A summary message for the deletion operation.
  • StatusCode (number): The HTTP status code indicating the result of the operation (200=all success, 207=partial success, 500=all failed).
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Add Stripe Customer Card

Adds a new payment method (card) to a specified Stripe customer. Supports adding via a token, payment method ID, or card details.

Input Parameters:

  • CustomerId: The ID of the customer to add the card to (e.g., cus_1234567890).
  • Source: The payment source - can be a token (tok_xxx), payment method ID (pm_xxx), or card details.

Options:

  • Metadata: Custom metadata, in JSON string format (e.g., {"card_name": "Primary Card", "type": "business"}).

Output:

  • Card (string): The full card object returned from Stripe, in JSON string format.
  • CardId (string): The ID of the added card.
  • Message (string): A success message indicating the result of the addition.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Get Stripe Customer Cards

Retrieves a list of payment methods (cards) for a specified Stripe customer. Supports fetching a specific card by ID or all cards via pagination.

Input Parameters:

  • CustomerId: The ID of the customer from whom to retrieve cards (e.g., cus_1234567890).

Options:

  • CardId: The specific card ID to retrieve. If provided, only this card will be retrieved. Leave empty to get all cards.
  • Limit: The number of cards to retrieve (1-100). Used only when CardId is empty. Defaults to 10.
  • StartingAfter: For pagination, specifies the card ID to start retrieving after.
  • EndingBefore: For pagination, specifies the card ID to end retrieving before.

Output:

  • Cards (string-array): An array of card objects retrieved from Stripe, with each element as a JSON string.
  • CardData (string): The full card data returned from the Stripe API, in JSON string format.
  • TotalCount (number): The number of cards returned in this response.
  • HasMore (bool): Indicates if there are more card records available for pagination.
  • NextCursor (string): The cursor for retrieving the next page of results.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Delete Stripe Customer Card

Deletes a payment method (card) from a specified Stripe customer.

Input Parameters:

  • CustomerId: The ID of the customer from whom to delete the card (e.g., cus_1234567890).
  • CardId: The ID of the card to delete (e.g., card_1234567890 or src_1234567890).

Output:

  • DeletedCard (string): The deleted card object returned from Stripe, in JSON string format.
  • CardId (string): The ID of the deleted card.
  • Deleted (bool): Indicates if the card was successfully deleted.
  • Message (string): A success message indicating the result of the deletion.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Create Stripe Payment Intent

Creates a new Payment Intent for handling modern payment flows that require extra verification steps (like 3DS).

Input Parameters:

  • Amount: The amount to charge, in the smallest currency unit (e.g., cents for USD).
  • Currency: The three-letter ISO currency code (e.g., 'usd', 'eur').

Options:

  • PaymentMethodTypes: A comma-separated list of payment method types (e.g., 'card,alipay'). Defaults to 'card'.
  • Description: A payment description for your records.
  • CustomerEmail: The customer's email address.
  • CustomerId: Provide a Stripe customer ID if charging an existing customer.
  • ConfirmationMethod: The confirmation method for the Payment Intent (automatic or manual). Defaults to automatic.
  • Metadata: Key-value pairs for additional information, in JSON string format.

Output:

  • PaymentIntentId (string): The unique identifier for the created Payment Intent.
  • PaymentIntentData (string): The full Payment Intent data returned from the Stripe API, in JSON string format.
  • ClientSecret (string): The client secret for confirming the payment on the frontend.
  • PaymentStatus (string): The status of the Payment Intent (requires_payment_method, requires_confirmation, succeeded, etc.).
  • NextAction (string): The next action required for the payment (e.g., 3DS verification), in JSON string format.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Create Stripe Source

Creates a new payment source, supporting cards, bank accounts, and various other payment methods.

Input Parameters:

  • Amount: The amount to charge, in the smallest currency unit (e.g., cents for USD).
  • Currency: The three-letter ISO currency code (e.g., usd, eur, gbp).
  • SourceType: The type of payment source to create (card, bank_account, alipay, etc.).

Options:

  • CustomerEmail: The customer's email address associated with the source.
  • CustomerName: The customer's name associated with the source.
  • ReturnUrl: The URL the customer is redirected to after validation (required for some source types).
  • StatementDescriptor: The statement descriptor shown on the customer's bank statement.
  • Metadata: Additional metadata, in JSON string format.

Output:

  • SourceId (string): The ID of the created payment source.
  • ClientSecret (string): The client secret of the created payment source.
  • Status (string): The status of the created payment source.
  • RedirectUrl (string): The redirect URL if validation is needed.
  • SourceData (string): The full payment source data, in JSON string format.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Get Stripe Source

Retrieves the details of an existing payment source by its ID, returning full information including status, type, and associated metadata.

Input Parameters:

  • SourceId: The ID of the payment source to retrieve (e.g., src_1234567890).

Output:

  • Source (string): The full source object returned from Stripe, in JSON string format.
  • SourceId (string): The ID of the retrieved payment source.
  • Type (string): The type of the payment source (card, ach_credit_transfer, alipay, etc.).
  • Status (string): The status of the payment source (pending, chargeable, consumed, canceled, failed).
  • Amount (number): The amount associated with the source, in the smallest currency unit.
  • Currency (string): The three-letter ISO currency code.
  • Usage (string): The usage type of the source (reusable or single_use).
  • Created (number): The Unix timestamp of when the source was created.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

Delete Stripe Source

Deletes a specified payment source. Note that a source can only be deleted if it is in a specific state and has not been used for a payment.

Input Parameters:

  • SourceId: The ID of the payment source to delete (e.g., src_1234567890).

Output:

  • DeletedSource (string): Information about the deleted source object, in JSON string format.
  • SourceId (string): The ID of the deleted source.
  • Deleted (bool): Indicates if the source was successfully deleted.
  • Message (string): A success message indicating the result of the deletion.
  • StatusCode (number): The HTTP status code indicating the result of the operation.
  • ErrorMessage (string): An error message if the operation fails; otherwise, an empty string.

5. Example Usage

This section will guide you through creating a simple workflow to create a new customer in your Stripe account.

Workflow Overview

A basic workflow consists of three nodes: Start -> Create Stripe Customer -> Answer.

Step-by-Step Guide

  1. Add Stripe Node:
    • In the workflow canvas, click the “+” sign to add a new node.
    • In the pop-up panel, select the “Tools” tab.
    • In the tool list, find and select Stripe.
    • In the list of supported operations for Stripe, click to select Create Stripe Customer, which will add the corresponding node to the canvas.
  2. Configure Node:
    • Click the newly added Create Stripe Customer node, and its configuration panel will expand on the right.
    • Credential Configuration: At the top of the panel, find the credential field. Click the dropdown menu and select your pre-configured Stripe credential.
    • Parameter Entry: Fill in the customer information in the “Options” section. Stripe requires at least one of Email or Name.
    • Email: Enter the new customer's email address, e.g., new.customer@example.com.
    • Name: Enter the new customer's full name, e.g., John Doe.
    • Description: (Optional) Add a description for the customer, e.g., Valued customer since 2024.
  3. Run and Validate:
    • When all required parameters are correctly filled in, the error prompt in the top right corner of the workflow canvas will disappear.
    • Click the “Run” button in the top right corner of the canvas to execute the workflow.
    • After successful execution, you can click the log icon in the top right corner to view the node's detailed input and output. In the output, you should see the CustomerId of the newly created customer (e.g., cus_xxxxxxxxxxxxxx) and the full Customer object data, indicating that the customer has been successfully created in Stripe.

After completing these steps, your entire workflow is configured. Each time this workflow is run, a new customer will be created in your Stripe account.

6. FAQs

Q: Should I use Create Stripe Payment Intent or rely on the older Charge API?

A: Stripe strongly recommends using the Payment Intents API for all new payment integrations. It provides better flexibility to handle payment scenarios that require additional verification steps (like 3D Secure) and complies with modern payment regulations (like SCA). The Charge API can still be used for simple, one-off payments, but Payment Intents are the way forward.

Q: My API call failed and returned a 401 or 403 error. Why is that?

A: These types of errors are usually related to credentials or permissions. Please check the following:

  • Incorrect API Key: Ensure you have configured Stripe's Secret Key (starts with sk_) in your GoInsight credentials, not the Publishable Key (starts with pk_).
  • Key is Invalid: Your API key may have been rotated or revoked. Please log in to the Stripe Developer Dashboard to generate a new key and update your credentials.
  • Insufficient Permissions: If you are using a restricted key, make sure it has the necessary permissions to perform the required actions (e.g., creating customers, processing payments, etc.).

Q: When using Create Stripe Coupon, what should I enter in the Currency field if I set AmountOff?

A: The Currency field must be a three-letter ISO currency code that matches a currency supported by your Stripe account. For example, if your discount is $10, you should enter 1000 in AmountOff (for 1000 cents) and usd in the Currency field.

7. Official Documentation

For a more in-depth understanding of all the features and parameters of the Stripe API, please refer to the official documentation:

Stripe Official API Documentation

Was This Page Helpful?
Discussion

Leave a Reply.

Your email address will not be published. Required fields are marked*

loading...
No Results