#lliu_docs

1 messages ¡ Page 1 of 1 (latest)

golden carbonBOT
#

👋 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/1362204002510700716

📝 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.

woven plaza
#

Hi! How are you creating Subscriptions in Stripe?

#

Oh, sorry, you're using Checkout?

grizzled flax
#

no. using server sdk.

#

but at the point where StripeElement is bootstrapped in the browser, no Stripe subscription has been created. I just bootstrap the browser StripeElement with mode = 'subscription'

#

setup:

  1. let's say i have 2 payment configuration "a" and "b"
  2. on the dashboard, I set the default payment method for invoice is "b"
  3. bootstrap PaymentElement using paymentMethodConfiguration = "b" and mode = "subscription"

result by my observation:
even though "b" is used to bootstrap the PaymentElement, but given mode = "subscirption", it is enabled payment emethod options in "a" being presented instead of "b"
If I switch mode = 'payment' and reload the browser page, then payment method options exclusive to "b" start appearing

#

That seems to be saying as long as a PaymentElement is bootstrapped for for 'subscription', only "Default Payment Configuration" can be in effect

#

want to confirm if that is a correct conclusion?

woven plaza
#

Can you share a Request ID of where you experienced this?

grizzled flax
#

That is what i am also looking for
As the PaymentElement is bootstrapped, I was monitoring the request log on the dashboard and no requests coming in for payment method

#

but that is my guess

woven plaza
#

Can you share the code you use to create the Payment Element, and also to create the Subscription?

grizzled flax
#

setOptions({
mode: isSubscription ? 'subscription' : 'payment',
setupFutureUsage: 'off_session',
amount,
currency,
customerSessionClientSecret,
captureMethod: 'automatic',
paymentMethodConfiguration,
appearance: {
theme: 'stripe',
},
customPaymentMethods: (customePaymentMethods ?? []).map(
(pm: string) => {
return {
id: pm,
options: {
type: 'static',
},
};
}
),
} as StripeElementsOptions);

#

the options is then used to bootstrap Stripe Payment Elements

<Elements stripe={loadStripe(publicKey!)} options={options}>
...
</Elements>

#

At this point, the broswer page will display all payment method available for purchase and no subscription has been created at this point

woven plaza
#

I can't find the docs for that right now, but a ton of those options don't make any sense for a Payment Element whose job is only to capture payment details?

Also, unless you're reloading that <Elements>, and that reload re-calls setOptions(), it's not going to update the options, right?

grizzled flax
#

yes. that is why there is always a reload in the test setting.

woven plaza
#

It sounds like if you reload it, it uses the correct Payment Configuration, ya?

grizzled flax
#

no ...

golden carbonBOT
gusty trail
#

Can you share the link to your site where we can see your integration? If yes, do share the test login credentials (if any) and steps to navigate to the page where we should be seeing the Payment Element.

grizzled flax
#

sorry... had the server running on localhost at the momnent

golden carbonBOT
grizzled flax
#

i can do a video chat if that helps

gusty trail
#

we don't do video chats unfortunately. It'd be great if you can share a link that we can access to take a look

grizzled flax
#

i see.

#

let's close this thread for now. I will think of other ways to confirm. Thanks.