Not possible to specify payment_method_types
See original GitHub issueHi there! I wanted to specify other payment methods like stated in docs; https://stripe.com/docs/payments/p24/accept-a-payment?platform=checkout
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card', 'p24'],
line_items: [{
...
but it seems not possible. I tried to look into the source code. It seems that in stripe.js https://github.com/dayhaysoos/use-shopping-cart/blob/6fd480cdc8264a609efaf6ea879178ea8a4e2769/use-shopping-cart/core/middleware/stripe.js#L9 we would need to add extra parameter (getCheckoutData function)
const options = {
mode: cart.mode,
paymentMethodTypes: cart.paymentMethodTypes, // THIS IS MISSING ?
lineItems,
successUrl: cart.successUrl,
cancelUrl: cart.cancelUrl,
billingAddressCollection: cart.billingAddressCollection
? 'required'
: 'auto',
submitType: 'auto'
}
and extend the CartState thing here; https://github.com/dayhaysoos/use-shopping-cart/blob/6fd480cdc8264a609efaf6ea879178ea8a4e2769/use-shopping-cart/core/index.d.ts#L117
Seems like a quick win, but probably I am missing something.
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
Stripe API reference – PaymentMethods – curl
Billing information associated with the PaymentMethod that may be used or required by particular types of payment methods. Hide child attributes ...
Read more >Fix payment and billing issues - Google Workspace Admin Help
Step 1: Make sure your payment method is valid · Click Add Payment Method. · Select the payment method and enter the details....
Read more >Payment Types
The Configuration > Cashiering > Payment Types option lets you define the payment method codes which you can select from the Reservation screen...
Read more >express - Stripe API "No valid payment method types for this ...
Stripe is looking for a payment method that can handle an amount lower than the minimum so that's why you get this error....
Read more >Payment Error Codes - ISN
CODE TEXT DESCIPTION
I00001 Successful. The request was processed successfu...
I00002 The subscription has already been canceled. The subscription has already been ca...
I00003 The record...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey! Thanks for bringing my attention to this, I’m gonna take a deeper look at this later tonight, just wanted to let you know that I saw this!
😦