#degi_code
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. Thank you for your patience!
โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.
๐ 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/1214875500594339861
๐ Have more to share? You can add more detail below, including code, screenshots, videos, etc.
Hi
I'm afraid that you can't achieve that using Apple Pay
Here are all the available options:
https://docs.stripe.com/js/elements_object/create_payment_element#payment_element_create-options-applePay-recurringPaymentRequest
What you can do I think is to set the recurringPaymentStartDate after the trial ends
Yeah, I tried that. Still shows X amount, not 0.
I guess, for now I have to live with it. But it would be very nice to have this possibility in the Stripe.js.
Yeah, I tried that. Still shows X amount, not 0.
Yes you'll see the amount and not 0 that's expected and that's how Apple Pay works
I guess, for now I have to live with it. But it would be very nice to have this possibility in the Stripe.js.
The issue is that is this a constraint on Apple Pay side and not Stripe side.
But yes I understand the confusion here
But on the payment link from Stripe it shows 0
That's a different component yeah
What you can do is is use Apple Pay with SetupIntents
But no sorry you are passing regularBilling object
So yeah, the best option is to set the recurringPaymentStartDate
that's how it looked on buy.stripe.com/.... page
any way to reproduce it?
this how Stripe Element looked
Are you passing a PaymentIntent or a SetupIntent with element ? can you share some code snippets ?
Ah I though you were talking about another UI, sorry
Can you share more details about how are you creating the Subscription? if possible share its Id. And how are you initiating the PaymentElement ?
where can I pass it?
You need to pass the setup_intent clientsecret:
https://docs.stripe.com/payments/save-and-reuse?platform=web&ui=elements#add-and-configure-the-elements-provider-to-your-payment-setup-page
something like this:
function App() {
const options = {
// passing the SetupIntent's client secret
clientSecret: '{{CLIENT_SECRET}}',
// Fully customizable with appearance API.
appearance: {/*...*/},
};
return (
<Elements stripe={stripePromise} options={options}>
<SetupForm />
</Elements>
);
};
I see. Thanks! Do you think this help me to get this 0 amount UI/UX (same as buy.stripe.com/...) :)?
Yes I think so, you need to use the client_secret of the pending_setup_intent of the Subsciption:
https://docs.stripe.com/api/subscriptions/object#subscription_object-pending_setup_intent
Thank you. I will try that.
Np!