Skip to content

Stripe Customer

This component allows you to interact with the Stripe payment system to manage your customer database. It acts as a bridge between your automation workflow and the Stripe API, enabling you to handle customer details such as names, emails, phone numbers, and addresses. Whether you are creating a new customer record for a subscription, looking up existing customer details, or cleaning up outdated records, this component provides the necessary tools to keep your customer data synchronized and accurate.

How it Works

This component connects to the Stripe API to perform various customer management tasks. When you configure the component in your Nappai dashboard, it sends a request to Stripe based on the specific action you choose (such as “Get By ID” or “Get All”). Stripe processes this request and returns the requested customer data. The component then parses this data and makes it available for you to use in subsequent steps of your workflow, such as updating a CRM, sending a notification, or generating an invoice.

Connection & Credentials

This component requires configuring a credential in the Nappai panel before interacting with the external service:

  1. Go to the Credentials section in your Nappai panel.
  2. Create a new credential of the type Stripe API and fill in the required fields (API Key). You can obtain this key from your Stripe Dashboard.
  3. In your workflow, select the saved credential in the Credential input field of this node.

Inputs

Input Fields

The following fields are available to configure this component. Each field may be visible in different operations:

  • Operation: Select the action you want to perform with the customer data.

    • Visible in: All operations
  • Get Mode: Choose between retrieving a single customer by their unique ID or listing all customers based on filters.

    • Visible in: All operations
  • Customer ID: The unique identifier for a specific Stripe customer (usually starts with cus_). This is required when you need to retrieve or update a specific customer record.

    • Visible in: Get By ID, Update, Delete
  • Name: The full name of the customer. Use this to set or update the customer’s displayed name.

    • Visible in: Create, Update
  • Email: The customer’s email address. This is used to identify the customer or as a filter when retrieving a list of customers.

    • Visible in: Create, Update, Get All
  • Phone: The customer’s phone number.

    • Visible in: Create, Update
  • Description: An arbitrary text description attached to the customer. This can be used for internal notes or reference.

    • Visible in: Create, Update
  • Limit: The maximum number of customers to return when listing customers (must be between 1 and 100).

    • Visible in: Get All

Outputs

The component produces the following outputs after execution:

  • Customer: The complete customer object containing all details (ID, name, email, etc.) returned by Stripe. You can map this data to other components.
  • Customer ID: The unique identifier of the customer. This is particularly useful for linking the customer to other systems or for subsequent updates.
  • Status: A string indicating whether the operation was successful or encountered an error (e.g., “success”, “error”).
  • Message: A detailed message providing more context about the result, especially useful for debugging if an error occurs.
  • Raw Response: The unprocessed JSON response from the Stripe API, available for advanced use cases where you need access to specific raw data fields.

Output Data Example (JSON)

json { “customer”: { “id”: “cus_123456789”, “name”: “Jane Doe”, “email”: “jane.doe@example.com”, “phone”: “+15550101”, “description”: “VIP Customer”, “created”: 1234567890, “currency”: “usd” }, “customer_id”: “cus_123456789”, “status”: “success”, “message”: “Customer retrieved successfully” }

Connectivity

This component is typically used at the beginning of a customer-related workflow. It can be connected to:

  • CRM Systems: To sync customer details with platforms like Salesforce or HubSpot.
  • Email Marketing Tools: To add new customers to mailing lists using the extracted email address.
  • Database Components: To store customer records for long-term retention.
  • Notification Components: To send welcome emails or SMS messages to newly created customers.

For example, after using the Create operation to add a new customer, you can connect the Customer ID output to an Update operation later in the workflow if you need to modify that customer’s information based on new data.

Usage Example

Scenario: Creating a New Customer

  1. Set Operation to “Create”.
  2. Enter the customer’s details in the Name, Email, and Phone fields.
  3. Set Get Mode to “Retrieve a single customer” (if needed for subsequent steps) or leave it as default for creation.
  4. Connect the output to an Email component to send a welcome message.
  5. The Customer ID output can be used to reference this customer in future invoices or updates.

Tips and Best Practices

  • Always validate email addresses before creating customers to ensure successful communication.
  • Use the Limit input in the Get All operation to control the amount of data fetched, which helps in managing performance and avoiding rate limits.
  • If you frequently access specific customer data, consider storing the Customer ID in a variable or database to avoid repeated lookups by name or email.

Security Considerations

  • Ensure that your Stripe API credentials are kept secure and are only used in trusted workflows.
  • Avoid exposing sensitive customer data in public logs or error messages.
  • Use the Description field for non-sensitive internal notes only; do not store confidential information like passwords or full credit card numbers in customer descriptions.