#rohailkamran

1 messages · Page 1 of 1 (latest)

fossil magnetBOT
#

Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

deep talon
#

Hello

#

Yes

#

We don't de-duplicate Customers (or any objects really) by default

#

You would want to pass the already-created Customer into the customer parameter if you don't want a new one created

lost kettle
#

I see, so to de-duplicate customers, I would have to do:

    const session = await stripe.checkout.sessions.create({
      payment_method_types: ["card"],
      mode: "payment",
      success_url: req.body.success_url,
      cancel_url: req.body.cancel_url,
      payment_intent_data: {
        setup_future_usage: 'off_session'
      },
      customer_creation: 'always',
      line_items: req.body.items,
      metadata:req.body.metadata,
      customer: req.body.customer_id
    })

Please note, I am still using the always flag.

#

Is this correct?

deep talon
#

You can't use both customer and customer_creation

#

You use one or the other

#

So remove customer_creation

#

And then yes, you have it correct.

lost kettle
#

I see, gotcha. Thanks!!