Love a tutorial on tracking status of Stripe invoices!

Anyone willing to provide a tutorial video on how to track the status of Stripe invoices?

The use case is pretty general: I am interested to use Glide’s Stripe integration to send invoices to users. That looks to be relatively straightforward. However, it looks to be a step up in complexity to track the status, e.g. pending, paid, overdue, etc…

I understand Stripe offers a Webhook that can be triggered by events related to the invoice and this can be configured to send that update to Glide.

I am just dipping my toes into the world of Glide Webhooks and related Workflows. I am hoping it’s possible to set up my Glide App to listen for these updates and process them without using an external provider like Zapier or Make.

If anyone is willing to confirm this is feasible as described and put down the steps then great. Even better if they could share a quick video demonstrating the webhook and workflow set ups.


ChatGPT confidently shares these tips:

Here’s how you can do it effectively:

1. Set Up Stripe Webhooks

Webhooks allow Stripe to notify your app about changes in an invoice’s status (e.g., payment completed, failed, or overdue).

  • Go to Stripe Dashboard:
    • Navigate to Developers > Webhooks.
    • Click Add Endpoint and provide a URL for your Glide app’s webhook (e.g., https://hooks.glideapp.io/webhook/your-app-id).
  • Select Events to Track:
    • Choose events like:
      • invoice.payment_succeeded
      • invoice.payment_failed
      • invoice.updated
      • invoice.payment_action_required
  • Test the Webhook:
    • Use Stripe’s test mode to send sample events and ensure your endpoint is receiving them.

2. Create a Webhook in Glide

  • Use Glide’s Webhooks Integration:
    • In your Glide Data Editor, create a column in the table tracking invoices (e.g., “Invoice Status”).
    • Add a Workflow that listens for Stripe’s webhook data and updates the status column in real time.
  • Example Workflow Setup:
    • Trigger: Webhook receives Stripe event.
    • Steps:
      1. Parse the JSON payload to extract invoice status (payment_succeeded, payment_failed, etc.).
      2. Match the invoice ID from Stripe with the record in your Glide table (use a unique column like “Invoice ID”).
      3. Update the “Invoice Status” column in Glide with the received status.

3. Update Invoice Status in Real Time

  • Add a Status Column:
    • In your table, create a column for “Invoice Status” and update it automatically via the webhook.
  • Visual Indicators:
    • Use Glide’s Conditional Visibility:
      • Show different statuses (e.g., Paid, Pending, Failed) using icons or color-coded labels.
      • Users can see whether their invoice is pending or paid.

4. Test the Full Flow

  • Test Events in Stripe:
    • Simulate events like payment success and failure in Stripe’s test mode.
  • Verify Updates in Glide:
    • Check that the invoice status in Glide updates correctly based on the webhook payload.

A video showing how to ‘parse the JSON payload, etc…’ would be huge.

1 Like

I know you said you prefer not to use Zapier or Make, but I’ll share how I do it in Make so you get what’s needed to be done. It will mostly be the same as what ChatGPT said, but some tips here and there.

I go to Make, add a scenario and a new webhook.

I set up the webhook in Stripe and configure “events” that are tied to that webhook, then add the webhook URL from Make.

Then, it’s usually a series of extra setup in Make that would do “searches/lookups” in Stripe to get the human-readable info from the triggered Stripe event. When they send events, many fields are just IDs, and not actionable info you can work with.

An event object can look like this:

{
  "id": "evt_1NG8Du2eZvKYlo2CUI79vXWy",
  "object": "event",
  "api_version": "2019-02-19",
  "created": 1686089970,
  "data": {
    "object": {
      "id": "seti_1NG8Du2eZvKYlo2C9XMqbR0x",
      "object": "setup_intent",
      "application": null,
      "automatic_payment_methods": null,
      "cancellation_reason": null,
      "client_secret": "seti_1NG8Du2eZvKYlo2C9XMqbR0x_secret_O2CdhLwGFh2Aej7bCY7qp8jlIuyR8DJ",
      "created": 1686089970,
      "customer": null,
      "description": null,
      "flow_directions": null,
      "last_setup_error": null,
      "latest_attempt": null,
      "livemode": false,
      "mandate": null,
      "metadata": {},
      "next_action": null,
      "on_behalf_of": null,
      "payment_method": "pm_1NG8Du2eZvKYlo2CYzzldNr7",
      "payment_method_options": {
        "acss_debit": {
          "currency": "cad",
          "mandate_options": {
            "interval_description": "First day of every month",
            "payment_schedule": "interval",
            "transaction_type": "personal"
          },
          "verification_method": "automatic"
        }
      },
      "payment_method_types": [
        "acss_debit"
      ],
      "single_use_mandate": null,
      "status": "requires_confirmation",
      "usage": "off_session"
    }
  },
  "livemode": false,
  "pending_webhooks": 0,
  "request": {
    "id": null,
    "idempotency_key": null
  },
  "type": "setup_intent.created"
}

So per my paragraph above, you have to get the setup_intent readable info from the id “seti_1NG8Du2eZvKYlo2C9XMqbR0x”.

If you have a setup that doesn’t require the info to be readable, you can use the ID I guess.

Then, after I get the right info, I do a query to the destination table, filter out the row where the “Stripe ID” matches, and update the status.

2 Likes

To think how it would apply if you don’t use Make, I would say you have to use the webhook trigger that has just been released.

Use it as your webhook in Stripe, configure the right events, then after the trigger:

  • Use a Query JSON step to query out the matching iD.
  • Loop through the table to find the row that matches the ID.
  • Update the status to that row.

The pre-requisite is you have to store the ID that would match, in this case the invoice ID I guess.

2 Likes