> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getcargo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Stripe

> This page outlines how to use the Stripe integration to manage payment data in Cargo.

Stripe is a leading payment processing platform that powers online transactions for millions of businesses. Cargo's native integration with Stripe allows you to manage customers, search for payment data, and sync financial information directly from your workflows.

## How to set up Stripe

To connect Stripe, you'll need a Secret Key from your Stripe account.

### Connection details

| Field          | Description                |
| -------------- | -------------------------- |
| **Secret Key** | Your Stripe Secret API Key |

<Warning>
  Use your test mode secret key for development and your live mode secret key
  for production. Never expose your secret key publicly.
</Warning>

Once the connector is created, you can:

* **Set up Stripe data models** — Create data models from your Stripe customers, invoices, or subscriptions to trigger Plays.
* **Use Stripe in workflows** — Choose **Stripe** from the node catalog within a **Play**, **Tool**, or **Agent**.

***

## Stripe actions

### Search customers

Retrieve customer records based on filter criteria.

**Use cases**

* **Customer lookup** – Find customers by email, name, or metadata
* **Segmentation** – Retrieve customers matching specific criteria
* **Reporting** – Pull customer data for analysis

**Configuration**

| Field      | Description                                         |
| ---------- | --------------------------------------------------- |
| **Filter** | Define filter conditions to match customers         |
| **Limit**  | Maximum records to retrieve (default: 10, max: 100) |

### Search products

Retrieve product records based on filter criteria.

**Use cases**

* **Product catalog** – Search for products by name or attributes
* **Pricing analysis** – Find products matching pricing criteria

### Search invoices

Retrieve invoice records based on filter criteria.

**Use cases**

* **Invoice lookup** – Find invoices by status, customer, or date
* **Revenue analysis** – Pull invoice data for reporting
* **Collections** – Find overdue invoices for follow-up

### Search subscriptions

Retrieve subscription records based on filter criteria.

**Use cases**

* **Subscription management** – Find active or canceled subscriptions
* **Churn analysis** – Identify subscriptions at risk
* **Upgrade opportunities** – Find subscriptions eligible for upgrades

### Get customer

Retrieve a single customer by ID.

**Use cases**

* **Customer details** – Fetch full customer data for workflows
* **Conditional logic** – Make decisions based on customer attributes

**Configuration**

| Field  | Description            |
| ------ | ---------------------- |
| **ID** | The Stripe customer ID |

### Get subscription

Retrieve a single subscription by ID.

**Configuration**

| Field  | Description                |
| ------ | -------------------------- |
| **ID** | The Stripe subscription ID |

### Cancel subscription

Cancel an active subscription by ID.

**Use cases**

* **Customer offboarding** – End a subscription when a customer requests cancellation
* **Failed payment workflows** – Cancel subscriptions after repeated payment failures
* **Plan lifecycle management** – Programmatically stop subscriptions from Cargo workflows

**Configuration**

| Field  | Description                |
| ------ | -------------------------- |
| **ID** | The Stripe subscription ID |

<Warning>
  This action cancels the subscription immediately in Stripe.
</Warning>

### Get invoice

Retrieve a single invoice by ID.

**Configuration**

| Field  | Description           |
| ------ | --------------------- |
| **ID** | The Stripe invoice ID |

### Get product

Retrieve a single product by ID.

**Configuration**

| Field  | Description           |
| ------ | --------------------- |
| **ID** | The Stripe product ID |

### Insert customer

Create a new customer in Stripe.

**Use cases**

* **Customer creation** – Create customers from your CRM or signup flows
* **Pre-checkout** – Create customers before they complete payment

**Configuration**

| Field        | Description                              |
| ------------ | ---------------------------------------- |
| **Mappings** | Map Stripe customer properties to values |

### Upsert customers

Create new customers or update existing ones based on matching criteria.

**Use cases**

* **Data sync** – Sync customer data from your CRM
* **Avoid duplicates** – Ensure customers aren't duplicated
* **Customer enrichment** – Update customers with additional data

**Configuration**

| Field                      | Description                              |
| -------------------------- | ---------------------------------------- |
| **Matching Property Name** | The property to match on                 |
| **Matching Value**         | The value to match against               |
| **Mappings**               | Map Stripe customer properties to values |
| **Skip if exist**          | Update property only if it's empty       |

### Update customers

Update existing customer records.

**Use cases**

* **Data enrichment** – Update customers with enriched information
* **Metadata updates** – Add or update customer metadata
* **Address updates** – Update billing or shipping addresses

**Configuration**

| Field                      | Description                              |
| -------------------------- | ---------------------------------------- |
| **Matching Property Name** | The property to match on                 |
| **Matching Value**         | The value to match against               |
| **Mappings**               | Map Stripe customer properties to values |
| **Skip if exist**          | Update property only if it's empty       |

### Delete customers

Delete customer records from Stripe.

**Use cases**

* **GDPR compliance** – Delete customer data upon request
* **Data cleanup** – Remove test or invalid customers

**Configuration**

| Field                      | Description                |
| -------------------------- | -------------------------- |
| **Matching Property Name** | The property to match on   |
| **Matching Value**         | The value to match against |

<Warning>
  Deleting a Stripe customer is permanent. This will cancel all subscriptions
  and remove all payment methods associated with the customer.
</Warning>

***

## Stripe data models

Cargo allows you to create data models on top of your Stripe data that can be used to trigger Plays and power workflows.

### Available extractors

<AccordionGroup>
  <Accordion title="Fetch customers" icon="users">
    Pull customer records from Stripe with incremental sync support.

    **Use cases**

    * Build data models from your Stripe customers
    * Trigger workflows when customers are created or updated
    * Power customer lifecycle workflows
  </Accordion>

  <Accordion title="Fetch invoices" icon="file-invoice-dollar">
    Pull invoice records from Stripe with incremental sync support.

    **Use cases**

    * Track invoice status and payments
    * Trigger collection workflows for overdue invoices
    * Build revenue analytics
  </Accordion>

  <Accordion title="Fetch subscriptions" icon="repeat">
    Pull subscription records from Stripe with incremental sync support.

    **Use cases**

    * Track subscription lifecycle
    * Trigger workflows on subscription changes
    * Monitor churn and retention
  </Accordion>

  <Accordion title="Fetch products" icon="box">
    Pull product records from Stripe with incremental sync support.

    **Use cases**

    * Maintain product catalog data
    * Track product changes
  </Accordion>

  <Accordion title="Fetch plans" icon="list">
    Pull plan records from Stripe with incremental sync support.

    **Use cases**

    * Track pricing plan data
    * Monitor plan usage
  </Accordion>
</AccordionGroup>
