Menu

Post image 1
Post image 2
1 / 2
0

Polar external_id reconciliation: the customer field that keeps checkout tied to your user

DEV Community·FetchSandbox·25 days ago
#h6iF7Wl6
Reading 0:00
15s threshold

Checkout is not where a billing integration starts. For a SaaS app, it usually starts one step earlier: Can this billing customer be tied back to the right user in my app? That tiny mapping is easy to ignore when you are just trying to get checkout working. But later, when a webhook comes in, or a subscription changes, or support asks why someone paid but still has no access, this is the field you wish you tested earlier. In Polar, that mapping can live in customer metadata / external customer identifiers like external_id . The bug is not dramatic The bug usually looks boring. Your app creates a customer: POST /v1/customers/ Enter fullscreen mode Exit fullscreen mode You get back a Polar customer ID. Then later your app receives something like: customer.created subscription.active order.paid benefit.granted Enter fullscreen mode Exit fullscreen mode Now your code has to answer one question: Which local user does this belong to? If you only stored the provider customer ID, you can probably make it work.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More