Stripe Grid Integration

The Stripe Grid integration allows finance, billing, and sales teams to view, search, inline-edit, and export records from Stripe (Customers, Invoices, Subscriptions, and Charges) directly inside AppColab Grid without duplicating payment data in Salesforce.

Stripe Live Grid Preview


What’s Deployed

Component Name Purpose
Named Credential Stripe Connects to https://api.stripe.com via Stripe External Credential
External Credential Stripe Custom authentication with Bearer <Stripe_Secret_Key>
Apex Client StripeClient.cls REST client supporting listResources, getResource, createResource, updateResource, deleteResource
Apex Data Provider StripeGridDataProvider.cls Implements appcg.GridDataProviderV1 and appcg.GridDataMutationProviderV1 with full CRUD for Customers and Read/Search for Invoices/Subscriptions
Permission Set Integration_Admin Grants access to Stripe → ApiKey external credential principal

One-Time Manual Setup

1. Obtain Your Stripe Secret Key

  1. In your Stripe Dashboard, switch to Test Mode (or Production).
  2. Go to Developers → API keys.
  3. Under Standard keys, copy the Secret key (starts with sk_test_... or sk_live_...).

Stripe API Key Setup


2. Configure Credentials in Salesforce Setup

2.1 Create the External Credential

  1. Go to Setup (gear icon ⚙️ → Setup).
  2. In the Quick Find box, enter Named Credentials and select Named Credentials.
  3. Click the External Credentials tab → click New:
    • Label: Stripe
    • Name: Stripe
    • Authentication Protocol: Custom
    • Click Save.
  4. In the Principals section, click New:
    • Parameter Name: ApiKey
    • Sequence: 1
    • Click Save.
  5. In the Custom Headers section, click New:
    • Name: Authorization
    • Value: Bearer YOUR_STRIPE_SECRET_KEY (e.g. Bearer sk_test_...)
    • Sequence Number: 1
    • Click Save.

Stripe External Credential Setup

2.2 Create the Named Credential

  1. Click the Named Credentials tab (next to External Credentials) → click New:
    • Label: Stripe
    • Name: Stripe
    • URL: https://api.stripe.com
    • External Credential: Select Stripe
    • Generate Authorization Header: Leave Unchecked (handled by custom Authorization header)
    • Allow Formulas in HTTP Header: Checked
  2. Click Save.

Stripe Named Credential Setup


3. Assign Permission Set Access

  1. In Salesforce Setup, enter Permission Sets in Quick Find.
  2. Select Integration Admin (or Appcolab Grid Admin).
  3. Click External Credential Principal Access → click Edit.
  4. Add Stripe - ApiKey to Enabled External Credential Principals.
  5. Click Save and verify the permission set is assigned to your Salesforce users.

Creating a Stripe Grid Definition

  1. In Salesforce, open AppColab Grid app → Grid Definitions tab → click New Grid Definition.
  2. Fill in:
    • Grid Settings Name: Stripe_Customers_Grid
    • Grid Label: Stripe Customers
    • Is Active?: Checked
    • Data Provider Class: StripeGridDataProvider
    • Data Provider Configuration:
      {
        "resource": "customers"
      }
      

      Tip: Change "resource" to "invoices", "subscriptions", or "charges" to create dedicated grids for other Stripe entities.

  3. Click Save & Next → proceed to Preview.
  4. Customers load live with Name, Email, Currency, Account Balance, Delinquent status, and Creation Date!

Stripe Grid Definition


Supported Grid Features

Resource Supported Actions Included Columns
Customers View, Search, Inline Edit, Add Customer, Delete Customer ID, Name, Email, Phone, Currency, Balance, Delinquent, Created
Invoices View, Search, Filter, Export Invoice ID, Number, Customer Name/Email, Total, Amount Due, Status, Due Date
Subscriptions View, Search, Filter, Export Subscription ID, Customer, Plan, Status, Current Period Start/End, Cancel at Period End
Charges View, Search, Filter, Export Charge ID, Customer, Amount, Currency, Status, Paid, Payment Method, Created

Troubleshooting

  • 401 Unauthorized: Invalid API Key provided: Verify that your Stripe secret key starts with sk_test_ or sk_live_ and has no trailing whitespace.
  • User doesn't have access to the external credential principal: Assign the Integration Admin permission set to your Salesforce user.