How to do stripe integration using Nodejs in ForestAdmin

I have to implement stripe integration with ForestAdmin using Nodejs.
I have read your documents but I didn’t find proper way to integrate Stripe.
Thanks

Hello @Mayur_Malaviya

At which point are you blocked?
Did you edit your middlewares/forestadmin.js file, as per the doc?

What is mapping field there?

The mapping field is the <collection>.<field> on your database which contains the stripe customer id that you wish to link to.

The integration needs that information to connect between your customers objects (stored in your database) and Stripe customers objects (accessible with their API).

You can find the doc about the stripe customer object here: https://stripe.com/docs/api/customers/object

@romaing Suppose, stripe customer id is stored in the entity such as payment.paymentdetails. Here paymentdetails contain object and strip customer id is inside that object. How should I point that id in the mapping?

Hello @Mayur_Malaviya

Which agent are you using? forest-express-sequelize or mongoose, so that I can ask more information to the maintainer of the feature?

@romaing I am using forest-express-sequelize.

I made change in middleware as it mentioned in document.

app.use(await Liana.init({
configDir: path.join(__dirname, ‘…/forest’),
envSecret: process.env.FOREST_ENV_SECRET,
authSecret: process.env.FOREST_AUTH_SECRET,
objectMapping,
connections,
// integrations: {
// stripe: {
// apiKey: process.env.STRIPE_SECRET_KEY,
// mapping: ‘orders.payment_data’,
// stripe: require(‘stripe’)
// }
// }
}));

But, in mapping I wrote orders.payment_data because customer strip is is inside that column, so data of that column is object and id is inside that object.
How can I point out that id?

I hope you understand my query.

I don’t think you can without changing the structure of your database.
Would that be possible?

After looking at the implementation of the stripe integration, this use-case is not natively supported.

@romaing Ok thanks, I have done this in another way.