Feature Requests
Open

Use our own user ID as the customer ID, and one endpoint for a customer's full access state

Every app that integrates Dodo has its own user table. Today we have to store the Dodo customer_id against our user and keep the two in sync. Then, on every request, we call several endpoints to answer one question: "what does this user have right now?"

Use case

  • When a user signs up we create the Dodo customer with external_id = our_user_id.
  • From then on we call any customer endpoint (get, update, payment methods, portal session, entitlements) using our own ID, with no mapping table.
  • In our auth middleware, one call such as GET /customers/external/{id}/state returns the active subscriptions, granted entitlements (feature flags, license keys and so on) and credit or meter balances.
  • A customer.state_changed webhook fires whenever any of that changes, so we can update our cache in one place.

Why it matters

  • It removes a whole class of sync bugs: the customer is duplicated, or the mapping is lost after a re-signup.
  • Gating features becomes one fast lookup instead of three or four API calls.
  • It makes Dodo much easier to drop into auth libraries such as Better Auth or Clerk.

0 Comments

Sign in to comment

No comments yet. Be the first to share your thoughts.