Integrating Ideal with stripe into Node.js

433 Views Asked by At

Ive made the app based on this tutorial: https://stripe.com/docs/checkout/express

How do I now change the payment method from creditcard to ideal? ideal docs: https://stripe.com/docs/sources/ideal#create-source

Question: where do I call the stripe.createSource({ source?


Things I've tried: Changing the stripe.customers.create({ in the app.js to the stripe.createSource({

changing data fields in the .pug file

making edits in the stripe.charges.create({


If you have any suggestions let me know!

1

There are 1 best solutions below

1
On

You might want to check out the documentation, which has code samples: https://stripe.com/docs/sources/ideal

The basic steps are:

  1. Create a source object

  2. Redirect your customer to the redirect[url] on your new source

  3. Create a webhook endpoint that listens to when sources become chargeable, and create a charge

You can see a demo app that uses Stripe Sources, including iDEAL here: https://github.com/thorsten-stripe/sources-demo