Skip to main content

Stripe Data Source

Overview

The Stripe connector provides powerful data ingestion capabilities for payment processing, customer management, and financial reporting. You can choose from pre-configured endpoint templates for common use cases or manually configure custom endpoints for specific data requirements.

Prerequisites

Before creating a Stripe data source, ensure you have:

  • A configured Stripe credential (see Stripe Authorization)
  • Access to the Stripe data you want to ingest
  • Understanding of Stripe's data structure and API endpoints

For complete information about Stripe's API capabilities, see the official Stripe API documentation.

Endpoint Templates

The following pre-configured endpoint templates are available for common Stripe data ingestion scenarios:

  • Get All Records of a Type: Retrieve all records of a specific type (charges, customers, products, etc.) with automatic pagination
  • Get Filtered Records of a Type: Retrieve records matching specific filter criteria using Stripe's query parameters

Get All Records of a Type

Get All Records of a Type

Retrieve all records of a specific type from Stripe with automatic pagination. This endpoint is ideal for comprehensive data extraction and historical data analysis.

  • Record Type: Select the type of Stripe records to retrieve (e.g., charges, customers, products, subscriptions, invoices, etc.)
  • Starting After: Optionally specify a record ID to start pagination from a specific point

This endpoint automatically handles pagination and will retrieve all available records of the specified type. The records are returned sorted by creation date, with the most recently created appearing first.

Get Filtered Records of a Type

Get Filtered Records of a Type

Retrieve records of a specific type that match your filter criteria. This endpoint allows you to extract targeted data based on specific conditions and parameters.

  • Record Type: Select the type of Stripe records to retrieve (e.g., charges, customers, products, subscriptions, invoices, etc.)
  • Query: Enter valid URL query string parameters for filtering (e.g., "created[gte]=1640995200&status=succeeded")
  • Starting After: Optionally specify a record ID to start pagination from a specific point

The query parameter must be a valid URL query string. Check Stripe's API documentation for allowed search criteria and parameter formats for each record type.

Manual Configuration

If the pre-configured templates don't meet your needs, you can manually configure custom Stripe API endpoints.

API Method

Select the HTTP method for your API request:

  • GET: For retrieving data (most common for Stripe API)
  • POST: For creating or updating resources

API Endpoint URL

Configure the complete Stripe API endpoint URL:

  1. Base URL: https://api.stripe.com/v1/
  2. Resource Path: Specify the Stripe resource you want to access (e.g., charges, customers, products)
  3. Query Parameters: Add any required or optional query parameters

Example URLs:

  • https://api.stripe.com/v1/charges - Retrieve all charges
  • https://api.stripe.com/v1/customers?limit=100 - Retrieve customers with limit
  • https://api.stripe.com/v1/products?active=true - Retrieve active products

Date/Time Macros

Use dynamic datetime placeholders for flexible endpoint configuration:

  • ${start.cron}: Current execution time in cron format
  • ${start.iso}: Current execution time in ISO 8601 format
  • ${start.unix}: Current execution time as Unix timestamp

Example with date filtering:

https://api.stripe.com/v1/charges?created[gte]=${start.unix}

Lookup-Based Macros

Reference data from other Nexla sources for dynamic endpoint configuration:

  • ${lookup.source_name.field_name}: Access specific fields from other data sources
  • ${lookup.source_name.field_name[*]}: Access array elements from lookup sources

Path to Data

Specify which part of the Stripe API response contains the relevant data:

  • JSON Path: Use dot notation for nested data access
    • $.data[*] - All items in the data array
    • $.data[0] - First item in the data array
    • $.has_more - Pagination indicator

Metadata

Preserve contextual information from Stripe API responses:

  • $.has_more: Indicates if more data is available for pagination
  • $.object: Type of object returned by Stripe
  • $.url: URL used for the API request

Request Headers

Configure additional HTTP headers for API customization:

  • Authorization: Automatically handled by Nexla using your Stripe credential
  • Stripe-Version: Specify API version (e.g., 2020-08-27)
  • Content-Type: Usually application/json for Stripe API

Example headers:

Stripe-Version: 2020-08-27
Content-Type: application/json

Testing Your Configuration

After configuring your Stripe data source:

  1. Test Connection: Verify that Nexla can successfully connect to Stripe
  2. Preview Data: Review a sample of the data that will be ingested
  3. Validate Schema: Ensure the data structure matches your expectations
  4. Check Rate Limits: Monitor Stripe's rate limiting to avoid API throttling

Stripe has rate limits that vary by endpoint and account type. Monitor your API usage in the Stripe Dashboard to ensure you stay within limits.