#icurrytheteam

1 messages · Page 1 of 1 (latest)

dusk trenchBOT
echo elk
#

hello! can you elaborate more on the default payment method is being recorded under source instead - where do you see this?

small turret
#

I'll use stripe.Customer.retrive("{{CUSTOMER_ID}}") to get a customer. My response looks like the following:

echo elk
#

you'll need to check both parameters when you attempt to retrieve the default payment method

small turret
#

So if I wanted to query the paymnt method below from a customer, id need to check both fields? I'm asking because I'd like it if we can automatically charge the default payment method when a user subscribes to a vendor.

#

For example, if a user has a default payment method, then they would click on a button that says subscribe and it would auto-charge that card for a subscription.

echo elk
#

i mean, that would already work as it is if the customer has either a default_payment_method or default_source set

#

if you try to create a Subscription with a customer that has either of that already set, they'll automatically be charged

small turret
#

Ok, well I see why I was having an error in my code.

#

It seems I was only checking default_payment_method and not default_source.