#Barba

1 messages Β· Page 1 of 1 (latest)

pseudo rockBOT
round vector
#

I think you'll need to get the payment intent associated with the invoice: https://stripe.com/docs/api/invoices/object#invoice_object-payment_intent then retrieve it and look at it's payment method: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-payment_method

fading atlas
#

πŸ‘€

#

Does the payment_intent come in the invoice.paid webhook? Thanks

#

Well let me check it

#

Thanks!!

round vector
#

Yeah it does

#

No problem

fading atlas
#

Do we have a place where I can see all the payment_method_types options??

round vector
#

Yeah it's on the payment intent object

#

That's what you're looking at right?

#

That api spec reflects what is seen via the api

fading atlas
#

Yep but I would like to see on the doc all the possible options to make sure what comes

#

"payment_method_types": [
"card"
],

#

"payment_method_types": [
"card"
// and what more options???
// google or google_pay
// apple or apple_pay
// ..
],

round vector
#

Well that depends on your account

#

And the location of the customer

#

There's many factors that determine what's available for that specific customer

fading atlas
#

Could I see an example of a customer that has paid with google pay button and Apple Pay button ?

round vector
#

You can test this yourself in test mode to see what happens

#

But it should just show card

fading atlas
#

Mmmm I’m looking for a way to identify if the user has used the google play or Apple Pay button option 😦

#

But if for those cases will came card… not sure how to identify this using the webhooks

round vector
#

Gotcha. There should still be a way to tell them apart. One sec

fading atlas
#

πŸ₯° thanks

round vector
#

So to find this info you'll need to go to the payment intent's latest charge object: https://stripe.com/docs/api/payment_intents/object#payment_intent_object-latest_charge and then on that charge object, you can find wallet details here to indicate if apple pay or google pay was used: https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-wallet

fading atlas
#

πŸ‘€

round vector
#

I also recommend looking into expansion to reduce the number of api calls you have to make here: https://stripe.com/docs/expand

Learn how to reduce the number of requests you make to the Stripe API by expanding objects in responses.

fading atlas
#

Thanks a πŸ’―