Stripe Checkout Session Data Retrieval and Custom Field Filtering - n8n Workflow

Retrieve all paginated Stripe checkout sessions over the last 20 days using this powerful n8n workflow. Efficiently split and filter custom fields like 'nickname' and 'job_title' for targeted data analysis.

Workflow Preview

Ready to automate?

Download this n8n workflow template and start using it instantly.

Who is this best for?


  • Users needing to analyze custom field data captured during Stripe checkout.

  • Automation specialists looking for an example of robust Stripe API pagination within an n8n node.

  • Developers seeking ready-to-use n8n templates for finance and payment operations.

  • Anyone who needs to extract and segment specific customer metadata from Stripe sales data.

Overview

Managing vast amounts of transactional data often requires complex API interactions, especially when dealing with pagination. This sophisticated n8n workflow template solves the challenge of extracting comprehensive Stripe checkout session records, ensuring no data is missed by utilizing built-in pagination handling in the initial n8n node. It is specifically designed to retrieve all session data from the last 20 days. Once retrieved, the workflow cleanses and processes the nested custom_fields data, allowing users to apply precise filtering logic. This robust n8n workflow saves significant development time compared to writing custom scripts for data retrieval and segmentation.

How it Works

This n8n workflow is initiated manually (or via an n8n trigger, if scheduled) and follows a four-step process for data extraction and filtering.


  1. API Retrieval with Pagination: The workflow starts by executing a specialized HTTP Request n8n node configured for the Stripe API. It automatically handles Stripe's pagination mechanism, ensuring every relevant checkout session from the last 20 days is retrieved.

  2. Split All Data: The massive list of sessions received from Stripe is split into individual data items using the split all data n8n node. This prepares each session object for granular processing.

  3. Split Custom Fields: The next n8n node, split customfields, isolates and splits the nested customfields array within each session item. This makes the key/value pairs accessible for easy filtering.

  4. Targeted Filtering: Finally, the Filter by customfield n8n node applies filtering logic. In this specific n8n template, the filter is configured to only keep custom field entries that match predefined keys, such as 'nickname' and 'jobtitle', allowing for targeted data segmentation from the original Stripe session.

Installation Guide

To deploy this n8n workflow and start retrieving your Stripe data, follow these steps:


  1. Import the n8n Workflow: Copy the provided JSON data and paste it directly into your n8n instance using the 'New' > 'Import from JSON' function.

  2. Set up Stripe Credentials: The first n8n node ('Stripe | Get latest checkout sessions1') requires Stripe API credentials. Click on the credential selector within the node and add or select your existing Stripe API Key credential. This credential type is designated as stripeApi within the configuration.

  3. Review Timeframe: The Stripe HTTP Request n8n node is currently set to retrieve data created within the last 20 days. Adjust the created.gte parameter in the JSON Query if you need a different lookback period.

  4. Customize Filtering: Modify the logic in the 'Filter by custom_field' n8n node to match the exact custom field keys you wish to segment.

  5. Execute: Run the n8n trigger manually or set up a Schedule n8n trigger for recurring execution.

Node Details

Stripe | Get latest checkout sessions1 (HTTP Request n8n node)
Function: Retrieves a list of checkout sessions from the Stripe API (/v1/checkout/sessions). This specialized n8n node is configured to handle complex pagination, iterating through all results until the hasmore flag is false.
Key Configuration: Uses a JSON query to filter results based on creation date (last 20 days) and uses predefined Stripe API credentials.
split all data (Split Out n8n node)
Function: Takes the main data array from the Stripe response body and separates it, creating one output item for every single checkout session retrieved.
split custom
fields (Split Out n8n node)
Function: This crucial step in the n8n workflow targets the nested customfields object within each session and splits its contents, making the key/value pairs individual items ready for filtering.
Filter by custom
field (Filter n8n node)
* Function: Applies specific conditions to the split custom fields. It is designed to pass only the items whose key matches 'nickname' and 'job_title'. This is where users customize which data points they want to keep from the entire n8n template run.

Related n8n Workflows

Free

Nodes: 4 Nodes
Updated: December 26 2025
View all
Created by

Freelance consultant from Brazil, specializing in automations and data analysis. I work with select clients, addressing their toughest projects. For business inquiries, email me at [email protected] or message me on Telegram for a faster response.

Featured*