Payment processing - What are you all using?

We had this issue with our jewelry, we had Etsy handle this for us initially but it became a big problem with VAT in Germany, UK, etc. I had closed off international sales for a while because of it. I currently sell in US / Canada because the VAT is crazy sauce. Last i looked at it you have to register with every country in order to remit the payment, or have a 3rd party you have do it for you but you still have to register within the country legally, its quite insane, but we are selling physical products, most of you guys are selling digital services so this might be different. We currently have to collect Nevada sales tax, they tried to do a nexus sales tax but they lost and the supreme court said if you do not have a physical presence there they cannot force you to collect tax on their behalf, so as of right now we are safe here in the US, but overseas have their own rules.

My Stripe app integrations are usually quite simple, just subscription plans or one-off credit packs. Haven’t had need for deeper integrations yet.

I use the test mode in Stripe (havent tested sandboxes yet) and create the few products “Recurring” or “one-off” and set the price_id env vars ready. Then I’ll create a new webhook for the replit dev url and add the listened events.

checkout.session.completed
customer.subscription.created
customer.subscription.deleted
customer.subscription.updated
invoice.payment_succeeded
subscription_schedule.canceled

I don’t have a specific prompt template that I use, usually its enough to include the following main points:

Instruct Agent to add new Subscription/Product page with the env vars for plans/products, and instructing to create a new Checkout Session for the payment (so customer is directed to Stripe page to fill in payment details) and a api/webhook for processing the stripe events from checkout. In the webhook I replenish account details, credits etc.

Then I’ll just test the flow by subscribing to a plan or buying product and using test clocks to test the renewals etc. Usually Agent tries to use wrong json paths from Stripe response so I copy a problematic event from the Webhook logs so it knows the correct format. When everything is working I copy the products and webhook to prod and update url’s and secrets.

For now I have settled for single currency prices and let card providers handle the possible exchange but I have thought of adding logic for Euro/Dollars in the future if needed.

@shawn93 What kind of integrations do you do with Stripe?

I’m running the same as you basically, although I don’t think I have deleted or invoice setup.

Do you basically have it integrated with a Users table and have monitoring to make sure subscriptions are always up-to-date in the event an API goes down or some data doesn’t sync?

A long time ago I was at a company and found they didn’t have access setup properly so we had thousands of customers who didn’t update card information after the card expired. Just thought I’d check since it’s my first time implementing it :smiley:

Yes, I’ve integrated it with Users table, so stripe customer id is linked to user. I haven’t made any additional monitoring yet. Stripe already has automatic retry logic for failed events and if there is too much failures, I get alerts to email. Haven’t had issues yet, maybe if/when I have enough subscribers I might make some additional validation checks.

If customer doesn’t update card info, then payment wont succeed and now cycle subscription update is done. I think Stripe sends emails to customer if card is expired/declined.

I’m trying to avoid over engineering too early, otherwise apps would be delayed too much.. I keep updating fixing as I learn :smiley: