#rahul_docs
1 messages · Page 1 of 1 (latest)
👋 Welcome to your new thread!
⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1262905422805729452
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
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.
- rahul_api, 1 hour ago, 14 messages
hi again - found this, but the docs seem a bit out of date
Hi there!
i have a customer in test mode, who has 2 saved payment methods, and at least 1 has allow_redisplay set to always
When generating the element, this is the snippet of the code from react
<Elements
stripe={stripePromise}
options={{
appearance: {
theme: "night",
},
clientSecret: paymentResponse?.paymentIntentClientSecret,
customerOptions: {
customer: paymentResponse?.customerId,
ephemeralKey: paymentResponse?.ephemeralKey,
},
}}
>
<CheckoutForm
event={event}
selectedTickets={selectedTickets}
paymentResponse={paymentResponse}
/>
</Elements>
we pass in the customerId and the ephemeralKey
but it only renders the card input form
and there's no mention of saved payment methods
Give me a few more minutes
no worries - take your time, and appreciate any help at all 😅
Just dumping whatever we've used so i can avoid wasting too much of your time
Since this is still in beta, you'll need to work with the beta team on this
I recommend waiting until you get a response from payment-element-beta@stripe.com
Actually, no, I think I'm wrong. This is being rolled out as we speak which is why it's all over the docs
oh gotcha - if there's a good chance it'll be live tomorrow, I might just leave it for tomorrow
Was still looking through some details on this. to be clear, are you using the mobile PaymentSheet?
ok - on ios, we've already built this using customerSheet and it works awesome (built last week)
now we're trying to deploy the same flow on web
essentially following this https://docs.stripe.com/payments/save-and-reuse on the Web tab
and the Custom Payment Flow
https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements#save-payment-methods
Right, okay. And you've gotten to the point of creating a CustomerSession in your backend?
yup we're on that step
and i haven't fully reviewed the backend but on the frontend side, it defines the code as
const elementsOptions = {
clientSecret: '{{CLIENT_SECRET}}',
customerSessionClientSecret,
// Fully customizable with appearance API.
appearance: {/*...*/},
};
but the customerSessionClientSecret isn't defined anywhere in stripe's package on react
on the backend the code seems to be there (we're using Go and it's defined)
if something's being updated rn that would be awesome and i'd give whoever was in charge a big hug, but if not i'll just build it manually 😭
Do you get an error if you just try to pass in both client secrets (for the SetupIntent and the CustomerSession)?
the problem is that there's nowhere to pass in the customerSessionClientSecret
What we actually use
options={{
appearance: {
theme: "night",
},
clientSecret: paymentResponse?.paymentIntentClientSecret,
customerOptions: {
customer: paymentResponse?.customerId,
ephemeralKey: paymentResponse?.ephemeralKey,
},
}}
in the options object defined in the package, there is no customerSessionClientSecret
unless we're somehow using the wrong object
Adding it to the options prop in the Elements provider doesn't work? https://docs.stripe.com/js/elements_object/create#stripe_elements-options-customerSessionClientSecret
1 sec reviewing now
Object literal may only specify known properties, and 'customerSessionClientSecret' does not exist in type 'StripeElementsOptionsClientSecret'.ts(2353)
react-stripe.d.ts(671, 5): The expected type comes from property 'options' which is declared here on type 'IntrinsicAttributes & ElementsProps & { children?: ReactNode; }'
this is the error we're getting
which is very strange because on this page
https://www.npmjs.com/package/@stripe/stripe-js?activeTab=code
export interface StripeElementsOptionsClientSecret
extends BaseStripeElementsOptions {
the BaseStripeElementsOptions includes both customerOptions?: CustomerOptions; and customerSessionClientSecret?: string;
but for some reason on our end it's not being recognized
options={{
appearance: {
theme: "night",
},
customerSessionClientSecret: paymentResponse?.setupIntentClientSecret,
clientSecret: paymentResponse?.paymentIntentClientSecret,
// customerOptions: {
// customer: paymentResponse?.customerId,
// ephemeralKey: paymentResponse?.ephemeralKey,
// },
}}
in this code, the customerSessionClientSecret has the error, but the customerOptions doesn't, even tho they're coming from the same place
I don't think this is causing the error but the value of customerSessionClientSecret should be the client secret from a CustomerSession, not from a SetupIntent
The value of clientSecret should be either a PaymentIntent client secret or a SetupIntent client secret
Yup - ignore the vars, just put them in as a random string
What are the odds it’s just our specific devices not loading the packages correctly? (Unlikely since I tested on 3 separate ones but just for the sake of completion)
hmmmm, actually i think it's because we just recently launched a new feature, and customerSessionClientSecret may not yet have been released in a new version yet. Gimme a while to take a look at the package
I’ll wait a while - honestly if that’s the case that’s a huge relief, I’ve spent the last couple hours scouring the code to figure out what’s wrong and I have NOTHING
I think it'll be good to write in and we can keep you updated if that's really the case https://support.stripe.com/contact/email
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.
Can you share your account id? You can find your account id by logging in to https://dashboard.stripe.com/settings/account. It'll be in the upper right hand corner and looks like acct_123
Once you've written in, let me know and I can find the support ticket and keep you updated
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
sure, that's fine