#ro_hit_h
1 messages · Page 1 of 1 (latest)
Payment Element
Are you running into any issues? How are you trying to do it now?
I don't understand your use case so it's hard for me to advice. Could you please elaborate more?
I am doing a project in React that has stripe payment. I have done card payment section using stripe-react library. I need to do other payment method like apple pay, google pay, etc.
I am trying to use payment element for this method
And you only see Card?
Yes
Have you enabled other PM types in your Stripe Dashboard?
How to do that
Yes, it works in Test mode.
I am only this
Could you please share the PaymentIntent ID pi_xxx?
I didn't purchase
Do you create the PaymentIntent before or after you collect the payment method details?
One min let me check
I guess after
Can you share your React code where you initialise the <Elements /> provider
const StripeWrapper: React.FC<WrapperProps> = ({
paymentSession,
children,
}) => {
const options: StripeElementsOptions = {
clientSecret: paymentSession!.data.client_secret as string | undefined,
}
return (
<Elements stripe={stripePromise} options={options}>
{children}
</Elements>
)
}
export default Wrapper
Ok, you're creating the Payment Intent before
Can you share your backend code that creates the Payment Intent? Or a pi_xxx ID?
let me check
You're likely missing the automatic_payment_methods[enabled] parameter: https://stripe.com/docs/api/payment_intents/create#create_payment_intent-automatic_payment_methods
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
pi_3NnH0dSFC5T0gHYo1FpiMwIh_secret_k4Tmh75792sqPZwbrXWNVcRGk
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
You need to update your code that makes that API request to include that parameter
Otherwise it will only support cards by default
Can suggest any method?
I don't know what that means
I am using this plugin medusa-payment-stripe in backend
Then you need to speak to the maintainer of that plugin