#afonso

1 messages · Page 1 of 1 (latest)

raven vesselBOT
pale raven
#

You would need to have the SetupIntent confirmed first

#

Then listen to webhook setup_intent.succeeded to pull out the Payment Method Id pm_xxx

#

And supply into Subscription

slim tendon
#

Got it

#

That's what I'm doing, and I also need to generate an invoice.

#

But I'm affraid I'm charging twice the customer

#

I generate an invoice, pay it, and then do

                        // Create subscription
                        const subscription = await stripe.subscriptions.create({
                            customer: stripe_customer_id,
                            items: [{ price: plan.stripe_price_id }],
                            default_payment_method: payment_method_id,
                            default_tax_rates: jobboard.taxes_enabled ? [tax_rate.stripe_id] : []
                        }, { stripeAccount: jobboard.stripe_id });
#

Am I charging twice?

pale raven
#

You have an Invoice separated from the Subscription?

#

Then that's 2 charges. You can confirm on your Stripe Dashboard to see how many times

slim tendon
#

Yeah, I think this is two charges right?

pale raven
#

Yep

slim tendon
#

Mmm

#

Is there a way while I'm creating the invoice

#

to turn it into a subscription?

#

Or create a subscription based on the invoice?