#Kekox123 - Customer Update Events

1 messages ยท Page 1 of 1 (latest)

pulsar obsidian
#

Hello! Can you give me the evt_ IDs for the two events in question?

hollow delta
#

Let me find those ๐Ÿ‘€

#

First event with the old default payment source evt_1KtLQHKNEK8dUItSk84iDoNs

#

Second event with the new default payment source evt_1KtLQHKNEK8dUItSW5XhxG1o

pulsar obsidian
#

If you don't want two events you can make those changes in a single request instead.

#

Does that help?

hollow delta
#

Yes it helps a lot, I'm calling this before setting the new default payment method:

const bankAccount = await stripe.customers.createSource(customerId, {source: bankAccountToken});

Which triggers the customer.updated event right?

pulsar obsidian
#

Yep.

delicate crow
#

๐Ÿ‘‹ I am taking over and catching up

hollow delta
#

So... I'm doing that to verify the bank account and bind the bank account to the customer and after that I set it as the default one, is there a way to do all in just one update? haha

delicate crow
#

I looked around but seems no, unfortunately

#

sorry

hollow delta
#

But am I doing it right? i.e. should I create the payment method and bind it to the customer first and then set it as default?

#

I mean I want the new payment method to be default so I can generate invoices to that payment method later.

delicate crow
#

Yes you are doing it right, no worry!

#

It's just by design you still need to split into 2 requests

hollow delta
#

Well that's good to hear haha, sounds like I need to check the default_source vs invoice_settings.default_payment_method fields to know when is safe to store the payment_method_id