#freshcarthq

1 messages · Page 1 of 1 (latest)

boreal ingotBOT
silver turtle
oak fog
#

In my use case, I am saving the stripe customer and the associated payment method ids (IDs only) in my app db, just so to avoid redundant calls to the Stripe API. However, if a customer has multiple payment methods attached to it. I need to indicate the default one on my app so that my app can use that payment method to initiate the checkout flow.

#

My user object looks like this

#

{ "userId": "743e589d-39bd-4f40-aa54-a1c5a19ba50b", "payment_methods": [ { "stripeCustomerId": "cus_.....", "default": true, "billing_details": {...} }, { "stripeCustomerId": "cus_.....", "default": true, "billing_details": {...} } ] }

silver turtle
#

Thanks for sharing the details. As mentioned earlier, default payment method can only be found in Customer object, but not on Payment Method object itself

oak fog
#

Okay, so I will need to set the default flag in the customer object and then associate it my internal user ID?

silver turtle
#

Yes, that is right!

oak fog
#

Just to be clear we are talking about the same thing....This default flag in the dashboard is the same one in the customer object?

silver turtle
#

Yes! This is the same one in the customer object. I'd recommend giving a try in test mode

oak fog
#

Thanks. I will try it out.