5 min read

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

2. inputs.starting_after

3. inputs.ending_before

4. config.limit

5. config.starting_after

6. config.ending_before

7. context

How It Works

  1. The function initializes by creating an integration instance with Stripe through the integration connection.
  2. It sets up the parameters for the payout retrieval by determining input values for limit, starting_after, and ending_before, falling back on configuration defaults as needed.
  3. It calls the retrieveAllPayouts method on the integration instance, passing the established parameters, which triggers communication with the Stripe API.
  4. The output from the Stripe API is returned in a structured format, making it available for further processing or display.
  5. 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:

javascript
{
  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.