#jacktileman_44638

1 messages · Page 1 of 1 (latest)

latent shuttleBOT
rancid shore
#

If a PaymentMethod is being attached to a customer then you'll get the payment_method.attached event

pliant moth
#

Did you mean payment_method_types=['card']?

#

@rancid shore - When you say "If a PaymentMethod" is being attached are you referring to stripe.checkout.Session.create parameter

rancid shore
#

Let me back up - based on the code you've provided you're creating a Checkout Session in setup mode. If setup is successful, it'll create and attach a new payment method to the customer

pliant moth
#

Ok. What happens if the payment method is NOT successfully attached?

#

@rancid shore - Will we get a different event by Webhook?

rancid shore
#

YOu wouldn't get any payment_method.attached events anymore but you'd likely get a setup_intent.setup_failed event because setup failed