#some1ataplace
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.
- some1ataplace-account-support, 3 days ago, 56 messages
- some1ataplace, 4 days ago, 33 messages
Hi there, no you can't set None to destination.
ok no worries. Another question about webhooks and checkout
stripe.checkout.Session.retrieve(event.data.object.id, expand=["line_items", "customer", "payment_intent.payment_method"],)
"payment_method_types": [
"card"
],
I want to see the payment_method_type the user just paid with. Is that the right field?
If I set multiple payment methods on the stripe dashboard, only 1 of them will show here?
So you want to know what payment method that your customer checked out with?
yes, even when they have multiple options to pay with. I want to get the one and only one they just paid with for that checkout session
sure, you can listen to checout.session.completed webhook event, get the payment_intent object from the checkout session objects, and check payment_intent's payment_method
Okay thanks
actually got a problem
checkout_session = stripe.checkout.Session.retrieve(event.data.object.id, expand=["line_items", "customer", "payment_intent.payment_method"],)
print(checkout_session)
checkout_session_payment_method = checkout_session.payment_method_types[0]
print(checkout_session_payment_method)
Then in the checkout session I removed:
payment_method_types=['card'],
Then checkout_session.payment_method_types[0] = card even though i paid with a bank account
"payment_method_types": [
"card",
"us_bank_account"
],
You need to check checkout_session->payment_intent->payment_method->type
not checkout_session->payment_method_types
"payment_intent": null,
Is the checkout session completed?
it redirected after i was done but i got a 400 error
?session_id=cs_test_a16FGOoEahmyRu25ofijgY9KebBmnaC3IMniqIRGzs0dkIDhPE4IUSJ2hZ
Hi! Can you share the request ID (req_xxx)? Here's how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
The response is 200, share with me the ID of request which response is 400.
happened on the command line:
Bad Request: /webhooks/stripe_payment_webhook/
[07/Nov/2023 05:17:11] "POST /webhooks/stripe_payment_webhook/ HTTP/1.1" 400 0
That's you webhook event handling code that returned 400
You need to check your webhook endpoint server log to find out why it returned 400 instead of 200
evt_1O9hf0IeTJrsS1rePJGbNe89