WebhookDB Gives You Wings!

Rob Galanakis on June 1, 2023

webhookdb hook logo wearing angel wings

Let's race.

Pick an API you enjoy using. Let's say Stripe, since it's a pretty darn good and common API.

Choose a question to ask your Stripe data. Let's start with something simple, like, 'how many charges were refunded over the last 30 days?'.

Now, I'll answer this question using the API. You go ahead and answer it using WebhookDB:

$ psql `webhookdb db connection` > SELECT SUM(amount) as total FROM stripe_refund_v1 WHERE created >= (NOW() - '30 days'::interval) AND created < NOW() AND status = 'succeeded';

Darn, you beat me! By a lot.

Let's try again. Let's find any Customers in Stripe that don't have a User in our application database.

I'll try using the API. Since you're self-hosting WebhookDB, you can query Stripe and your application database in the same query:

> SELECT stripe_id, data->'metadata'->>'user_id' FROM webhookdb.stripe_customer_v1 WHERE (data->'metadata'->>'user_id')::BIGINT NOT IN (SELECT id FROM myapp_users)

Uh, ok, you beat me again. Wasn't even close.

This speed and flexibility is why we say WebhookDB gives you wings.

If you're ready to stop stumbling around, then learn how to fly with WebhookDB.

Recent Blog Posts

zoomed in artificial snowflakes, each unique
Every API is Unique

June 8, 2023

Just like people, every API is unique in its own special way.

Read More →
programmers reading code behind two doors, one with more cursing than the other, correlating code quality and cursing
Why would they do that!

May 24, 2023

Or, how to stop worrying and learn to love every API.

Read More →
tired hippo sleeping
Never miss API changes

May 17, 2023

Ensuring changes to external systems are never missed is a difficult problem best left to dedicated services.

Read More →
open lock hanging from a door
Securing API keys

May 11, 2023

Learn about securing API keys when using React or building any client software.

Read More →