Anyone using Stripe tokenized charging?

Hey all,

Just wondering if anyone here has built an Wappler app that uses Stripe for on-demand charging?

Like, you store in your database a charge authorization, and then whenever the user clicks “Charge me now” you ask Stripe to charge $10

Usually it works like this:

  1. First payment/get authorization: Redirect user to Stripe to insert card details
  2. Stripe redirects back to your website once succesful, and you store a token in your DB
  3. You show a button “Charge me now”
  4. User clicks the button, Wappler app goes to DB and fetches the “token”
  5. You ask Stripe to charge $10 to the user with a given “token”
  6. Maybe next week the user wants to deposit more funds, so he/she clickes “Charge me now” again, and we jump to point 4

In my case I want to build a custom billing solution instead of relying on Stripe’s subscription. I need the flexibility to change the charge amount, and I charge (e.g.) day 1 of every month without user intervention

I think what you are describing is basically this:

  • initially you create a stripe customer and store that id in your db
  • You collect payment details by creating a setupIntent and then use confirmSetup which results in a paymentMethod id which you also store in the db for this customer
  • When it is time to actually charge the customer you create a PaymentIntent using the customer id and paymentMethod id’s you stored earlier

This process doesn’t use the Stripe portal for collecting information, so you can control everything within your app, without actually having the payment details hit your server.

I haven’t done this exact setup – I use subscriptions, but I believe the general process is the same.

1 Like

If it is ok to use other service provider , how about Fastspring. They seem to have very good features for on demand subscription charging
Also, unlike Stripe they are a Reseller / Merchant of Record.
So they also take care of tax compliance and legally they are responsible for vat registrations , payments, filing of returns , we don’t need to worry about anything. Whereas in Stripe they provide functionality to collect vat , but legally we are responsible for registering under VAT in different countries and filing the returns.

Here are some links i feel may be useful

https://fastspring.com/docs/managed-subscriptions-and-usage-based-billing/
https://fastspring.com/docs/manual-renewal-subscriptions/

1 Like

Hey,

Thanks for your opinion about FastSpring!

Indeed, having a MoR (Merchant of Record) is really nice. I have good experience using Paddle, but they’re not really focused on on-demand charging - FastSpring seems better on that!

For this next project I’m working on I’m building my own billing solution, and will attempt to handle taxes directly. For someone that’s just starting now definitely go for a MoR if they allow your kind of business :slight_smile:

1 Like

Oh sorry I didn’t realise you will be handling taxes yourself , that’s amazing. In my defence, I handle taxes in my “day job” and i feel compelled to warn anyone in sight to reduce the cost/effort of compliance. I can barely keep up with the many laws of my country , no way i can understand those of other countries :sweat_smile: I had considered Paddle but I went with Fastspring as i feel they have better features and easier to implement especially for beginners like me…

Oh, it’s not me - my accountant :smiley:

Though I do have to charge the correct VAT for each country (and need to stay updated). I’m based in Europe, so I’m only going to handle European taxes (OSS [previously VAT MOSS])

Before I used to handle taxes on my own - yeah, definitely no more (but I still have to learn something to see if the accountant is doing things right lol)

1 Like

Ha ha so true. I have an accountant and even a junior tax consultant but i never leave anything difficult or critical to them and recheck everything. Prevention is truly better than the cure in taxes.

Here in India we have moved to a better tax system (GST instead of VAT+Excise) but also there are more random audits under government's new risk management measures to reduce evasion. Due to this i can't take on any more compliance responsibility and I was so happy to come across MOR . Tears of joy ha ha

image :rofl:

1 Like