Skip to main content

Stripe Integration Overview

The Stripe page in the Admin Dashboard provides a comprehensive view of all Stripe customers and their billing information, allowing you to manage customer relationships and link them to FinMatch merchants.

Accessing the Stripe Page

Navigate to Stripe from the main navigation menu in the Admin Dashboard. The page displays a table of all Stripe customers with their subscription and billing details.

Data Flow

Admin Dashboard (admin/stripe/index.html)

Calls: Stripe API Service

Stripe API Service (Cloud Run)

Uses: Secret Manager (stripe-restricted-key)

Stripe API (External)

Returns: Customer data with subscriptions

Admin Dashboard displays customer table

Features

Customer Table

The Stripe page displays the following information for each customer:

  • Customer ID - Stripe customer identifier
  • Name - Customer name or description
  • Email - Customer email address
  • Subscription Plan - Active subscription plan name
  • Status - Subscription status (Active, Past Due, Canceled, None)
  • Next Billing - Next billing date
  • Created - Customer creation date
  • FinMatch Merchant - Linked FinMatch merchant (if connected)
  • Actions - Quick actions menu

Search and Filter

Use the search bar to filter customers by:

  • Customer ID
  • Name
  • Email address

Linking to Merchants

Customers can be linked to FinMatch merchants for seamless billing management. See Managing Merchants for details on linking Stripe customers.

Technical Details

API Endpoint

The Stripe page fetches data from:

https://finmatch-stripe-api-3cgkzplynq-nw.a.run.app/api/customers

Data Transformation

The API returns customers with expanded subscription data. The dashboard:

  1. Extracts subscription information from each customer
  2. Finds the active subscription (or first subscription if no active one)
  3. Extracts plan name from subscription items
  4. Calculates next billing date from current_period_end
  5. Displays subscription status with color-coded badges

Subscription Status Colors

  • Active - Green (#10b981)
  • Past Due - Red (#ef4444)
  • Canceled - Gray (#6b7280)
  • None - Light Gray (#9ca3af)

Troubleshooting

No Customer Data Showing

If the table shows "Loading Stripe customers..." or "No Stripe customers found":

  1. Check API Status:

    curl https://finmatch-stripe-api-3cgkzplynq-nw.a.run.app/health
  2. Check Browser Console:

    • Open browser developer tools (F12)
    • Look for errors in the Console tab
    • Check Network tab for API call status
  3. Verify API Response:

    curl https://finmatch-stripe-api-3cgkzplynq-nw.a.run.app/api/customers
  4. Check Deployment:

    • Ensure admin/js/merchants.js is deployed to GCS
    • Verify the latest code includes subscription data extraction

Subscription Data Missing

If customers show but subscription details are "N/A":

  • The customer may not have an active subscription
  • Check the browser console for data transformation errors
  • Verify the API is returning expanded subscription data