#daniyal_11692
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- daniyal_11692, 8 minutes ago, 13 messages
- daniyal_11692, 1 day ago, 9 messages
- daniyal_11692, 6 days ago, 8 messages
- daniyal_11692, 6 days ago, 11 messages
- daniyal_11692, 6 days ago, 24 messages
How can I help?
for any transaction i want to know about payment method and type like: “Wallet / Apple Pay” or “Card / Visa”
i've the payment intent object
Sure, then I'd recommend expanding the latest_charge field and then you can look at the payment_method_details[card] hash on the Charge object: https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Will have all the details like card type, brand, wallet, etc
You need to pass expand: ['latest_charge'] when you retrieve the Payment Intent: https://stripe.com/docs/api/expanding_objects
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Yep, that's how it works. Wallets are ultimately considered a card. There's a wallet hash you can use for Google Pay payments: https://stripe.com/docs/api/charges/object#charge_object-payment_method_details-card-wallet
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
walled field will be null in case if card?
Yes if a non-wallet
i see this info also in $paymentIntent['charges']['data'][0]['payment_method_details']
is it ok to use it from here instead of latest_charge
Hmm, I think you should only really see one of those fields depending on which AP version you're using: https://stripe.com/docs/upgrades#2022-11-15
Do you have an example pi_xxx ID?
pi_3OPObKH0mp7J0S261l3BWney
Yeah so that object was created using an older API version so charges should work fine too