#zeel-wechat
1 messages · Page 1 of 1 (latest)
hi! yes, Wechat can't be used for charges on saved payment methods, so it's not possible to use it together with cards in a single CheckoutSession like that unfortunately.
How can I identify payment method at checkout session?
can you expand on that question? not sure what it means exactly.
@shrewd rapids , suppose I have this kind of code. How do I manage two payment methods here?
you'd have to remove setup_future_usage unfortunately
it's not ideal, I agree! ideally you could use that parameter and if the customer picks WeChat then it would just work, but that's not how Checkout works today unfortunately.
So currently I will not be able to pass setup_future_usage based on the payment method the user choose right?
correct, if you want to allow the customer to pay with either card or WeChat, then you have to not also specify setup_future_usage, because that is not compatible with one of those payment methods.
Thank you for confirming @shrewd rapids .
In addition can you please tell me exact usage of setup_future_usage = on_session. And is it safe if I removed that key?
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_intent_data-setup_future_usage is the documentation for that paramater. It's save to remove it, it just means that the payment method won't be saved for any future payments.
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.