#islecavern
1 messages · Page 1 of 1 (latest)
Hello! Can you provide more details? What specific issues are you running into?
I redirect to checkout using the Stripe redirectToCheckout method in Javascript, with a successUrl and a cancelUrl to go back to my website, but it doesn't allow that
it says integration error
and if I just provide a session id, it will go to the checkout page, but then not redirect after
What is the full integration error you're seeing?
Its going to take a while becuase I changed all my code since the error trying to do something else and I will have to put it all back now to get that error
One thing I want to call out is that redirectToCheckout is deprecated: https://stripe.com/docs/js/deprecated/redirect_to_checkout
If you're rewriting things you might want to stop using it entirely and instead redirect your customer to the Checkout Session's URL instead: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-url
How are things going?
I'm confused
is that supposed to be a stripe checkout session that I redirect to somehow or that I render directly on my website?
and should I create it and use it on my server using php or on my client using javascript?
You're not creating Checkout Sessions now? Can you tell me more about how your integration works?
I originally just had the stripe checkout form that acts as a popup with no redirect required.
I had to ditch that though, because I am trying to add a promo code to the checkout
and the old style popup didn't seem to have a way to do that
so ever since then, I haven't figured out how to get things working
Are you looking for the simplest solution possible?
yes
I would like to do it with the simple popup form
but I need to add a promo code with that
You can't do it with a popup.
Have you looked at Payment Links? https://stripe.com/docs/payment-links/create
That's what I started using
but when I used the payment link
it would not redirect back to my website after submitting the form
What happened after you submitted the form?
it just stayed on the stripe website
and I had to click the back arrow to get back to my website
Did you create the Payment Link in the Dashboard?
yes
Did you configure this setting?
To get there go to https://dashboard.stripe.com/test/payment-links/ (test mode link), click on the ••• button next to the Payment Link you created, choose Edit, then go to the After payment tab.
Then try the Payment Link again.
Oh, don't forget to click on the Update link button in the top right after making changes.
no, I didn't notice the "After Payment" tab
Does that solve the issue? Will Payment Links work for you?
Awesome! 🙂
what about payment links to update a subscription?
to either update the credit card used to pay the existing subscription
or to change the promo code associated with the the exisitng subscription
We have the Customer Portal for that: https://stripe.com/docs/customer-management
ok
Is there a .css file for stripe that I can use to make elements such as buttons styled in the way the stripe styles them in my html?
hey there, if you mean styling your own elements like our elements, no we don't provide anything to achieve that, but you could certainly inspect the styling of any element and apply the same to another of your choosing
oh ok - I was just trying to make buttons that lead to your checkout links and such look like the stripe style
Ohhh, gotcha
So, we actually do have helper snippets for that, creating nicely styled "Buy Buttons" for payment links: https://stripe.com/docs/payment-links/buy-button
ok thank you
I just want to be absolutely sure about something
is there no way to allow promo codes using https://checkout.stripe.com/checkout.js?
No, that's a legacy integration that doesn't support any of our recent features