# Stripe

The **Stripe Node** allows you to interact with Stripe, a payment processing platform. In Stack AI, you can use this node to automate tasks such as creating customers, processing payments, issuing refunds, and more.

***

### Available Actions

Here are some of the main actions you can perform with the Stripe node:

* **Create Customer**: Add a new customer to your Stripe account.
* **Create Payment**: Charge a customer or process a payment.
* **List Charges**: Retrieve a list of past charges.
* **Search Customer**: Find customers by email or other criteria.
* **Send Refund**: Issue a refund for a specific charge.

***

### Example: Create Customer

#### Inputs

To create a customer, you need to provide:

* **Customer Name** (`customer_name`):\
  The name of the customer to create. (Required)
* **Customer Email** (`customer_email`):\
  The email address of the customer. (Required)

You can reference other nodes for these values, for example:\
`{in-0}` for user input, or `{llm-0}` for AI-generated content.

#### Outputs

After running, the node will output:

* **Customer ID** (`customer_id`): The unique Stripe ID for the new customer.
* **Customer Name** (`customer_name`): The name you provided.
* **Customer Email** (`customer_email`): The email you provided.
* **Customer Created At** (`customer_created_at`): The timestamp of creation.

You can reference these outputs in downstream nodes using the syntax `{action-8.customer_id}` (if your Stripe node is `action-8`).

***

### How to Use the Stripe Node

1. **Add the Stripe node to your workflow.**
2. **Select the desired action** (e.g., "Create Customer").
3. **Fill in the required input fields** (e.g., customer name and email).
   * You can use static values or reference outputs from other nodes.
4. **Connect the output of the Stripe node to other nodes** (e.g., to send a confirmation email, log the customer, or trigger another action).
5. **(Optional) Add your Stripe connection ID** if you have a custom Stripe account you want to use.

***

### Example Usage Scenario

* Collect user details with an Input node.
* Pass those details to the Stripe node to create a customer.
* Use the output (customer ID) to process a payment or send a welcome email.
