#mrnc18
1 messages · Page 1 of 1 (latest)
It depends on what payment UI you're using? There's nothign really to enable on the Dashboard
Whether or not you're using dynamic PMs is determined by the APIs/UIs you're using
Actually, i am trying to implement the dynamic PMs to my test account when I provide the parameter as automatic_payment_methods :enabled as true i am getting error with the "Received unknown parameter: automatic_payment_methods" and not able to redirect to the stripe checkout
By the my test account has been notactivated ?
Because that's not a valid parameter for Checkout
Checkout defaults to dynamic PMs, no need to pass a parameter
Is that okay to paste the parameters here
See: https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods
Yes
automatic_payment_methods = { enabled: true },
and here is my sessioncheckoutparams
if (automatic_payment_methods.enabled) {
sessionCreateParams.automatic_payment_methods = automatic_payment_methods;
}
Yeah, you can just omit that. It's not a valid parameter, hence the error: https://stripe.com/docs/api/checkout/sessions/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
previous code has been the payment_methods_types as card
Yep, you just remove the payment_method_types parameter and it defaults to dynamic PMs, as per: https://stripe.com/docs/payments/payment-methods/integration-options#using-dynamic-payment-methods
So no need to provide any payment related parameter for dynamic PM's
Correct
Can you clarify the question?
I am just asking that so no need to provide the payment_method_type parameter any where right
Are you using Setup Intents API directly? Or via mode: 'setup' in Checkout?
i am using as mode in setup
You will need to pass payment_method_types for those sessions yes: https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-payment_method_types
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
mode: 'setup' doesn't support dynamic PMs yet
Hi! I'm taking over this thread. Let me know if you have any other questions.
okay soma .So as per ynnoj suggestion i need to pass parameters for setupIntent as previosuly right
For mode: 'setup', yes you need to pass payment_method_types.
There's no automatic_payment_methods param with Checkout Session. So you would get an error if you tried.
For mode === paymentmethod
I am passing like this if (payment_method_types) {
paymentIntentCreateParams.payment_method_types =
payment_method_types;
} else {
paymentIntentCreateParams.automatic_payment_methods =
automatic_payment_methods;
}
So shall i supposed to remove thses lines
Hi soma there /
Is this code related to Checkout Session or something else?
In checkout session i am creating the setUp and paymentmethod ny using mode only
I'm confused. Can you share your full code that's creating the Checkout Session?
please spare me a minute
Please look into it and please help me to sort out and make the usage of dynamic PM's
please help me to sort out and make the usage of dynamic PM's
If you are usingmode: 'payment', simply remove thepayment_method_typeparameter to use dynamic PM.
If you are usingmode: 'setup', then it's currently not possible to use dynamic PM and you have to use thepayment_method_typeparameter.
okay apart from the code do i need to made any setup in dashboard of my stripe account like activate the account or enable any payment methods etcc.
Nothing in particular. You can manage your payment methods here: https://dashboard.stripe.com/test/settings/payment_methods
Thanks for the info and appreciate your patience.