#wagamumma_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1376879270185406544
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- wagamumma_best-practices, 1 hour ago, 25 messages
- wagamumma_webhooks, 5 days ago, 46 messages
- wagamumma_webhooks, 6 days ago, 7 messages
does payment intent or billing details contain the method they chose to pay by?
hi there!
you'll need to check the Payment Method object itself to get that information
ok thanks is there a doc page about doing this please so i know the exact code?
not really. what do you want to do exactly? if you have the PaymentIntent, check the payment_method property. Then retrive the Payment Method object.
basically our client just wants to store whether the payment was from google or apple pay in their order details in their website CMS, I'll have a look at the payment method object and see what I can find
$paymentMethod = $stripe->paymentMethods->retrieve(
$paymentIntent->payment_method,
[]
);
$name = $paymentMethod->billing_details->name;
$method=$paymentMethod->payment_method->name;
What I mean is how to use it, is it just
$method=$paymentMethod->payment_method
or
$method=$paymentMethod->payment_method->name;
for example
I don't understand your question, sorry. Did you look at the API reference for the Payment Method object? https://docs.stripe.com/api/payment_methods/object?api-version=2025-04-30.basil
so it might be "type" ? $paymentMethod->type wuld return "apple pay" or "google pay" ?
no, it would be card. and then you can check here if a wallet was used and its type: https://docs.stripe.com/api/payment_methods/object?api-version=2025-04-30.basil#payment_method_object-card-wallet
so $paymentMethod->card.wallet would return the type used?
assuming it's a card payment, yes
ok thank you
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!