#Cédric Morelle

1 messages · Page 1 of 1 (latest)

flint pathBOT
wanton sail
#

Hi there!

slate shadow
wanton sail
#

Can you clarify exactly what is the issue? The PaymentIntent you shared is successful. Is this because the user didn't receive an email from Stripe?

slate shadow
#

All good for email. Just as you saw i response customer is null

wanton sail
#

Just as you saw i response customer is null
If you don't set a customer ID when creating the PaymentIntent, then it's expected that the customer will be null.

slate shadow
#

and I expect Stripe to provide me a an id for this customer

wanton sail
#

So you need to first create a customer object, and then when you create the PaymentIntent make sure to pass the customer ID in the request.

slate shadow
wanton sail
#

Yes exactly

slate shadow
#

got it sorry for having bothered you, really you are making a fucking outstanding job on this Discord server!

#

Workflow of your doc are not always clear and paymentIntent is clearly different as our old workflow

#

tnx again

#

I have a question again

#

Let's say our customer, is not registered yet on our server

#

but you at stripe receive his mail,

#

that would make sense to have a customer created by your own as we can't create Stripe customer ourself as long as we don't have his mail @wanton sail

wanton sail
#

Happy to help 🙂

#

Is this a question or a feature request?

slate shadow
#

it is a question, is it possible to ask PaymentIntent to create customer while receiving Intent?

#

or does it means I have to update paymentIntent after we received payment confirmation?

wanton sail
#

No PaymentIntent cannot create a customer. You need to set an existing customer either when you create the PaymentIntent or when you update it.

slate shadow
#
  'pi_3N8iPIAslfugMFd91R3kuANK',
  {metadata: {customer_id: 'xxxx'}},
)``` ?
wanton sail
slate shadow
#

I'm in front of this page but what is the syntax to update customer ?

#

Stripe::PaymentIntent.update(
  'pi_3N8iPIAslfugMFd91R3kuANK',
  {customer: stripeCustomer},
)```?
#
Stripe::PaymentIntent.update(
  'pi_3N8iPIAslfugMFd91R3kuANK',
  {customer: stripeCustomer.id},
)```
wanton sail
#

Yes something like this should work. Have you tried?

  'pi_xxx',
  {customer: "cus_xxx"},
)```