listAllPayouts Documentation
Purpose
This node is designed to facilitate the retrieval of payout data from the Stripe payments platform. By interacting with the Stripe API, it allows users to fetch a list of payout transactions based on certain filtering criteria such as pagination (starting_after and ending_before), and an optional limit on the number of records returned. This functionality is critical for businesses that require insights into their payout activities for auditing, reconciliation, or financial reporting.
Settings
1. inputs.limit
- Input Type: Numeric
- Description: Specifies the maximum number of payout records to retrieve from Stripe's API. This acts as a pagination parameter, allowing the user to define how many records are returned in a single request.
- Default Value:
10 - Effect of Change: If changed to a higher number, more payout records will be returned in one request, which can be useful for large payout datasets. Reducing this value will fetch fewer records, aiding in pagination and reducing load times.
2. inputs.starting_after
- Input Type: String (typically a payout ID)
- Description: The ID of the last payout retrieved in a previous API request. It is used for pagination; specifically, it retrieves payouts that come after the specified payout ID.
- Default Value:
undefined - Effect of Change: Setting this value will enable the user to fetch the subsequent batch of payouts, effectively allowing for pagination backward and forward through payout records.
3. inputs.ending_before
- Input Type: String (typically a payout ID)
- Description: The ID of the payout that is last in the current API request. This is also used for pagination and allows retrieval of payouts before the specified payout ID.
- Default Value:
undefined - Effect of Change: Providing this value limits the returned records to those that are before the specified payout ID, enabling backward pagination through payout records.
4. config.limit
- Input Type: Numeric
- Description: A configuration setting that serves as a fallback for
inputs.limit. It provides an alternative limit for the maximum number of payout records to retrieve. - Default Value:
10(if not overridden byinputs.limit) - Effect of Change: Similar to
inputs.limit, adjusting this configuration affects the total number of payouts returned in any context whereinputs.limitis not provided.
5. config.starting_after
- Input Type: String (typically a payout ID)
- Description: A configuration setting that serves as an alternative to
inputs.starting_after, providing a default value that can be used for pagination. - Default Value:
undefined - Effect of Change: Any setting here will affect the starting point of the pagination when no
inputs.starting_afteris specified.
6. config.ending_before
- Input Type: String (typically a payout ID)
- Description: A configuration setting that serves as an alternative to
inputs.ending_before, providing a default value usable in pagination. - Default Value:
undefined - Effect of Change: This value dictates where the endpoint of the returned payouts will be when no
inputs.ending_beforeis specified, altering the scope of the retrieved data.
7. context
- Input Type: Object
- Description: An optional context variable which provides additional parameters necessary for the connection instance to Stripe. This object may contain authentication details or other configurations required to operate with the Stripe API.
- Default Value:
{}(an empty object) - Effect of Change: Influences the ability to connect to Stripe. Any modifications need to ensure proper authentication and configurations for data retrieval.
How It Works
- The function initializes by creating an integration instance with Stripe through the integration connection.
- It sets up the parameters for the payout retrieval by determining input values for
limit,starting_after, andending_before, falling back on configuration defaults as needed. - It calls the
retrieveAllPayoutsmethod on the integration instance, passing the established parameters, which triggers communication with the Stripe API. - The output from the Stripe API is returned in a structured format, making it available for further processing or display.
- In case of errors during the process, a well-defined error message is returned, indicating that a failure occurred in the Stripe integration.
Use Cases & Examples
Use Case 1: Financial Reporting
A company wants to generate monthly reports on payouts received. They can use this node to fetch all payout data for a specified time frame each month.
Use Case 2: Payout Reconciliation
An accounting department needs to reconcile payouts with bank statements. They can retrieve all payouts within a certain date range to match against bank records, ensuring accurate financial documentation.
Example Configuration
For a scenario where a company needs to review all payouts from the last week with pagination capability:
{
inputs: {
limit: 50, // Retrieve up to 50 payout records at once
starting_after: 'po_1234567', // Fetch records onward from payout ID po_1234567
ending_before: 'po_7654321' // Fetch records up to and including payout ID po_7654321
},
config: {
limit: 50, // Defaults to 50 if no input limit is provided
starting_after: 'po_1234567', // Default starting point if not overridden
ending_before: 'po_7654321' // Default endpoint if not overridden
},
context: {
apiKey: 'your-stripe-api-key' // Secure API key for authenticating with Stripe
}
}In this configuration, the logic effectively allows the user to navigate through a large set of payouts while maintaining clear boundaries for data limits and records. This setup would enable comprehensive financial oversight and reporting aligned with business requirements.