#SCIF

1 messages · Page 1 of 1 (latest)

thick geyserBOT
rigid spear
#

Hi, which version is your webhook endpoint?

ancient plover
#

2020-03-02

dark drum
#

Hi @ancient plover I'm taking over

#

The default_source attribute (https://stripe.com/docs/api/customers/object#customer_object-default_source) is not yet deprecated.

So it depends on whether your customer has default_source or invoice_settings.default_payment_menthod set. The customer object that you receive from webhook event may contain none, one of them, or both of them.

ancient plover
#

Both of them is fine, but what's about default_source only? My integration has moved to PaymentMethods and I'm wondering if there is a chance to received changed default_source value, so I will have to handle it using Source API

#

That's a bit strange to deprecate the technology/approach but not the result of using this technology

dark drum
#

So am I correct to say that the your old customers are still using default_sources but your new customers are now using invoice_settings.default_payment_menthod ?

ancient plover
#

What does mean they use?

#

All purchases are done using payment methods only

#

Not sure on subscription billings

#

I mean, I don't know how subscriptions are billed/setup for those purchased subscriptions 2 years ago, when we used Sources.

dark drum
#

OK. May I know your concern here? do you worry that the default_source will not work anymore?

ancient plover
#

I handle customer.updated events. The sake is next — to grab last4 digits of credit card and show to customers in their control panel. So I'm curious if it possible that I will receive the event having source which was updated

dark drum
#

As I explained earlier, it really depends whether the customer has default_sources or invoice_settings.default_payment_method set. So in your webhook event handling, you should do a null check on both of them and decide which one you want to show to your customer.

ancient plover
#

I'm curious whether default_source could be updated?

dark drum
#

Yes you can still update a customer's default_source

ancient plover
#

Got it. So if my integration uses PM's only, then I'm on a safe side and there is no way for customer to update their card (somehow outside of my service)

dark drum
ancient plover
#

And what property will be updated if customer has entered a new card through the Porta;?

dark drum
#

If a customer set their default payment method through portal, it'll be set as customer's invoice_settings.default_payment_method .

ancient plover
#

And what's about JS way to update CC?

dark drum
#

I don't quite understand this. The screenshot shows a checkout page to collect new payment.

ancient plover
#

Ok, sorry, don't know how that is called, as I'm just handing over the existing stuff, but we use that way to provide a facility to update a credit card for end-customers

#

Does it use PM as well?

dark drum
#

This will create a new payment_method and attach it to a customer, it won't set or replace the customer's invoice_settings.default_payment_method

ancient plover
#

Your help made things much more clear! Thank you!