Skip to content

Check Stripe plans in Airtable

A customer paid. Does Airtable say so?

A customer who just paid can still be on free in Airtable, and one who cancelled can still be on pro. Nobody tells you until the customer does, or never.

Fravni emails you when a customer’s plan in Airtable doesn’t match what they paid for or cancelled. Stripe sends Fravni its own copy of each payment and cancellation. Fravni finds the customer’s record by their Stripe customer ID and reads the plan. Your automation keeps its steps, and Fravni never changes your base.

This guide fits an Airtable table with one record per customer, kept current by Zapier, Make or your own code. You build two monitors, each from a recipe: a ready-made monitor you fill in. A third, for price changes, is optional.

Before you start, have:

  • a Stripe Administrator or Developer role, to add a webhook;
  • access to the Airtable base, to create a read-only token for it;
  • your base and table IDs, from the table’s web address in Airtable;
  • the names of your Customer ID and Plan fields;
  • each Stripe price you sell, and the plan it buys;
  • the text your automation writes when a subscription ends, such as “cancelled”.

Keep plans in your own app instead? Follow Check Stripe access in your own app.

A customer can pay for pro and still be on free in Airtable

Section titled “A customer can pay for pro and still be on free in Airtable”

Every step of your automation can succeed while the plan in the record stays wrong. Error alerts from Zapier or Make stay silent, because nothing failed.

Example data

Check detail Example
What came in Stripe invoice.paid
Record found by Customer ID = cus_R4kq9Lm2
Expected Plan pro
Observed Plan free
Read at 12:05 UTC
Deadline 12:05 UTC
Result Not matched by deadline

Keep each customer’s Stripe customer ID and plan in their record

Section titled “Keep each customer’s Stripe customer ID and plan in their record”

Fravni finds each customer’s record by their Stripe customer ID, which starts cus_. In Airtable’s grid view, each row is one record. Give your table one record per customer, with a Customer ID text field and a Plan text field your automation keeps current. If your automation doesn’t store the Stripe customer ID yet, add a step that writes it to Customer ID. Use your own field names.

When a subscription ends, your automation must write text such as “cancelled” in Plan, not clear it. Airtable leaves empty fields out of the record it returns, so a cleared plan never matches. If yours clears it, add a step that writes the text instead.

Add a Stripe webhook that works even when your automation doesn’t

Section titled “Add a Stripe webhook that works even when your automation doesn’t”

This webhook sends Fravni its own copy of each payment and cancellation. So a check starts even if your automation never runs. Adding it changes no charge, customer or other webhook. Fravni only receives events, and asks for no Stripe key.

  1. In Fravni, start a monitor from the recipe “Stripe payment sets the customer’s plan in Airtable”.
  2. When you choose where its events come from, pick Stripe and create a new webhook. Copy the webhook address it gives you.
  3. In your live Stripe account, open Workbench from the Developers menu, or press ~. Open its Webhooks tab and create a destination: Stripe’s word for a webhook. Choose events from Your account.
  4. For the payload format, choose Snapshot, not Thin, even though Stripe suggests Thin. A thin event carries only an ID, so Fravni would have no plan to read.
  5. Stripe shapes each event to the API version you pick here, and Fravni reads only the versions it knows. Choose the newest API version ending in .endive. You can’t change it later: a wrong pick means a new webhook, then deleting the old one.
  6. Select the event types invoice.paid and customer.subscription.deleted. Add customer.subscription.updated if you want the optional plan-change monitor. Picked now, your other monitors need nothing more in Stripe.
  7. Choose Webhook endpoint, paste the address from step 2 as the Endpoint URL, and create the destination.
  8. Reveal the signing secret, which starts whsec_, and paste it into your monitor. It proves each event came from Stripe. If it is pasted wrong, Stripe’s deliveries are refused, and you get an email.

Set the webhook up in live mode: a sandbox webhook never sees your live payments. From each event, Fravni keeps only the fields it takes and a scrambled code to spot repeats, never the whole event.

Create an Airtable token that can only read the base with your plans

Section titled “Create an Airtable token that can only read the base with your plans”

Create an Airtable personal access token with data.records:read, restricted to the base that holds your plans. Your Airtable account must also have access to that base. See Airtable’s personal access token guide.

A new monitor has no connection to Airtable yet. On your monitor’s page, open Connection › Settings and select Connect Airtable. Paste your personal access token as its credential, then select Create. The monitor now reads Airtable through that connection. Never put the token in a URL, a query or a sample. Fravni encrypts the token, never returns or logs it, and never changes a record.

Find each customer’s record by their Stripe customer ID

Section titled “Find each customer’s record by their Stripe customer ID”

On your monitor’s page, open Connection › Request: the request Fravni sends over the connection you chose. Set the path to your base and table IDs, such as /v0/appExample/tblCustomers. Open your table in Airtable: in its web address, the base ID starts app and the table ID starts tbl. Put your two IDs in place of the example ones, and keep /v0/.

The recipe already has a query entry named filterByFormula. Set its value to this template:

{{Customer ID}}={customer_id|airtable_string}

Type it exactly as shown. The doubled braces produce the Airtable field reference {Customer ID}. The airtable_string modifier quotes the Stripe customer ID safely. For the example customer, the formula sent to Airtable is:

{Customer ID}="cus_R4kq9Lm2"

See Airtable’s filtering guide. On Connection › Expected values, the recipe has two expected values, each comparing one field of the record with a value from the event. A Field path is the path to a value in the record Airtable returns. Set the field path of the one with Proves it’s the right record ticked, which tells Fravni which record belongs to the customer, to fields.Customer ID. Never limit the read to one record: a second matching record must stay visible (see Get an email when a customer has no record, or two).

Each Stripe price you sell has a price ID that starts price_. The recipe turns it into the plan your record should hold. On your monitor’s page, open Event source › Fields, and under Translated fields add one pair per price: From its price ID, To the plan exactly as your Plan field spells it. To find a price ID, open Workbench’s Events tab and filter by invoice.paid. Open a recent payment for a customer on that plan. The price ID sits under the invoice line’s pricing, in price_details, as the price value. Then, on Connection › Expected values, set the plan’s field path to fields.Plan.

Fravni never guesses a plan. A payment at a price with no pair gets no check. You get one email, and the monitor shows as suspended until the next payment at a mapped price. Suspended means some payments couldn’t be checked; the monitor still checks payments at mapped prices. More than one price may be missing. In Stripe’s Events, open the invoice.paid events from around the email’s time, find each price missing from your map, and add it.

This works when each invoice buys one plan. An upgrade invoice can list the old price first, so a right plan can read as wrong. See upgrades and prorations, and what to do when it happens.

The deadline is how long Fravni waits for the record to match. It runs from the moment Stripe’s event reaches Fravni. The recipe uses the default deadline. In the monitor’s timing settings, set it after your automation usually finishes. See read-timing questions.

Expect “cancelled” in the record once a subscription ends

Section titled “Expect “cancelled” in the record once a subscription ends”

Start a second monitor from the recipe “Stripe cancellation marks the customer’s Airtable plan cancelled”. When you choose where its events come from, pick the webhook your payment monitor uses. Nothing changes in Stripe. If you picked only invoice.paid, add customer.subscription.deleted to that webhook’s event types.

Choose the same Airtable connection. Then set the path, the filter formula and both field paths as you did for the payment monitor: the recipe doesn’t copy them over. In the plan’s expected value, choose Fixed value and type the exact text your automation writes, such as “cancelled”. “free” works too. Set the deadline as for the payment monitor.

Stripe sends the cancellation when the subscription actually ends, not when the customer clicks cancel. This works when each customer has one subscription. A payment that lands just after a cancellation, before its check, can show one false mismatch. See what to do.

Check the new plan when a customer changes price

Section titled “Check the new plan when a customer changes price”

This monitor is optional. A downgrade, or an upgrade billed later, brings no paid invoice, so the payment monitor never sees it. Start a third monitor from the recipe “Stripe plan change sets the customer’s plan in Airtable”, and pick the webhook your payment monitor uses. If you didn’t pick customer.subscription.updated earlier, add it to that webhook’s event types.

Set it up as you did the payment monitor: the same Airtable connection, path, filter formula and field paths, and one pair per price. The recipe doesn’t copy them over. Here the price ID sits in the subscription’s first item, under price, as the id value.

It checks active and trialing subscriptions. Stripe sends this event at each renewal too, so each renewal costs one check here, on top of the payment monitor’s. This works when each customer has one subscription with one price. A cancellation that lands before its check can show one false mismatch. See what to do.

Get an email when a customer has no record, or two

Section titled “Get an email when a customer has no record, or two”

Fravni reads the record until it matches or the deadline passes. Each result means one thing:

  • No record has the Stripe customer ID: Not found by deadline.
  • Several records have it: Cannot identify the record, rather than a wrong plan. Remove the duplicate record.
  • The record holds another plan: Not matched by deadline, with both plans.
  • The record holds the expected plan: Match observed at the read time.
  • Fravni cannot read Airtable: Could not check, with the cause. It never counts as a match.

A missing record, two records and a wrong plan each open an issue, and you get an email. That is why the read must never stop at one record.

Test each monitor on a customer in your table before you switch it on

Section titled “Test each monitor on a customer in your table before you switch it on”

Testing is optional, but recommended. Each test needs a sample: one Stripe event for a customer with a record in your table. Copy one payment and one cancellation from your live account:

  1. In Workbench, open the Events tab. Filter by invoice.paid, or by a Stripe customer ID. Stripe keeps full events for 30 days.
  2. Open a payment whose customer has a record, and find its api_version.
  3. If it ends in .basil, .clover, .dahlia or .endive, copy the event’s payload: its full text. Do the same for a customer.subscription.deleted event. For the plan-change monitor, copy a customer.subscription.updated event that lists items under previous_attributes.

Take both samples from a sandbox instead if the version has another ending, if you have no recent events, or if the test says the version isn’t supported:

  1. Open Sandboxes from the Dashboard’s account picker and create one. At its API version step, choose the newest version ending in .endive.
  2. Add a product with a price, and a second price if you test plan changes.
  3. Create a subscription at that price, and pay with test card 4242 4242 4242 4242.
  4. For a plan-change sample, update the subscription to the second price.
  5. In Subscriptions, open ⋯ on it, choose Cancel subscription and cancel immediately.
  6. Copy the events from the sandbox’s Events tab.
  7. In your payment monitor’s translated field, add a pair: From the sandbox price ID, To one of your plans, such as pro. Live events never carry it, so the pair does no harm. Map the second price in the plan-change monitor the same way.
  8. In Airtable, add a record with the sandbox customer’s Stripe customer ID, and give it that plan. Before you test the plan-change monitor, change its plan to the second price’s plan. Before you test the cancellation monitor, change it to your cancelled text. Delete the record once the monitors are live.

Test each monitor in two parts. Paste its event as the sample and run it: Fravni shows the fields it took and the request it will send to Airtable. Then run a live test read: it shows what the record holds, and the result. Testing uses none of your checks.

Publishing reads nothing, so the live test read is your one look at the record before the monitor starts. If the monitor can’t find its record, its first check ends Not found by deadline: Fravni opens an issue, and emails the account owner if your alert settings and sending limits allow.

Optional, with sandbox samples: see a miss before it counts. Use only the sandbox record, never a paying customer’s record. Change its plan, run a live test read and see the difference. Then set the plan back.

Fix the plan, then recheck the customer for free

Section titled “Fix the plan, then recheck the customer for free”

The account owner can receive an email about each new issue. It shows the Stripe customer ID, the plan expected and the plan found. Open the issue in Fravni. If the record is wrong, fix it or the automation that writes it, then recheck the customer. A recheck reads the record once, now, and is free. A match reads Matched later at the read time, beside the original deadline result.

Sometimes the record is right and the check is wrong: after an upgrade invoice, a payment just after a cancellation, or a cancellation just after a price change. A recheck can’t clear these, because the check keeps the plan it first expected. Confirm the plan in Stripe, then resolve the issue.

Whether an email goes out depends on your alert settings and sending limits. A match shows the plan in the record at the read time. It does not prove this payment or cancellation set it.

Only a payment, a price change or an ended subscription starts a check

Section titled “Only a payment, a price change or an ended subscription starts a check”

A check starts only when Stripe’s copy of a payment, a cancellation or, with the plan-change monitor, a price change or renewal arrives. A failed payment starts none. Without the plan-change monitor, nor does a plan change with no paid invoice. A scheduled cancellation or a metadata edit never starts one. An event Stripe never delivers cannot be checked. If you bill through Stripe Accounts v2, some events may leave out the Stripe customer ID. These monitors can’t check those, and you get an email.

All three monitors fit the Free plan, which is permanent.

Start free

See the Free plan’s limits. For why plan checks matter, see paid access. For another example, see Check Typeform applications in Airtable or Check Typeform leads in HubSpot.