3 ms·
Hi, Edwin. I'm in the process of integrating Stripe to https://iko.ai https://iko.ai. I recently discovered Portal (https://stripe.com/docs/billing/subscription
by Jugurtha 4y ago
Hi, Edwin. I'm in the process of integrating Stripe to https://iko.ai https://iko.ai. I recently discovered Portal (https://stripe.com/docs/billing/subscriptions/integrating-customer-portal https://stripe.com/docs/billing/subscriptions/integrating-cu...) and I thank you for that. Less code for me.
I'm a bit ashamed to say, but I'm having trouble with checking if the customer has a valid subscription. I'm currently only storing the customer_id in the database and retrieving the information from Stripe to have it as a single source of truth and avoiding putting the Stripe info in our database and having to make sure it's synced.
On the other hand, I can't make a request to Stripe with every request, so I'm thinking of memoization or something.
I could find guides on how to accept payments and create subscriptions which are trivial, but no examples on what happens after that.
Suppose I have an API with a single endpoint and set up a subscription for a customer, how do I not hit the Stripe API with every request to check if the subscription is still alive without storing customer info in my database and having to sync it (i.e: keep everything in Stripe)?
- edwinwee 4y agoiko.ai looks neat! Our developers hang out in Discord (https://stripe.com/go/developer-chat https://stripe.com/go/developer-chat) — this seems like a good question you can chat with them live about.
- Jugurtha 4y agoThat's great, I'll definitely /dev/pay* a visit. Next question: Algeria is not covered by Stripe. Many people here incorporate in the U.K or the U.S. just to accept payments. How can I put a country on the map here: https://stripe.com/global https://stripe.com/global What conditions that, if satisfied, would enable someone in Algeria to use Stripe directly? How can we make this happen?