#jay492-subscription-integration

1 messages · Page 1 of 1 (latest)

nocturne ospreyBOT
crystal grotto
#

What do you mean it's not working on a server? Have you collaborated with your developer team who handles deploying code on your servers?

somber sorrel
#

There is only me and my uni friend. I want to make the payment working on our website and embeded the payment features and it works when i use localhost but when i try to do on servers, when i click do payment in checkout.html, it doesn't go to anywhere.

crystal grotto
#

Ah gotcha. I can't really advise on that, as the steps for pushing your code to a server will vary based on the server you're using

somber sorrel
#

is it okay i send the code to you directly ? would you be able to take a look? it just checkout.html and server.js

crystal grotto
#

No, that won't help since you're able to get your Stripe integration working in your local environment. That means the issue is not specific to Stripe so looking at the Stripe integration code is unrelated

#

when i try to do on servers
this is what you should focus on, and how your codepaths in production are being interpreted by your server

somber sorrel
#

sorry what is this?

#

also, what do you have to do when you change it from test mode to live mode? I changed publish api key and secret key from test and change the domain to my webserver page.

crystal grotto
#

also, what do you have to do when you change it from test mode to live mode?
changing your publishable and secret keys from test mode to live mode makes sense, as well as updating any URLs to point to the production pages (vs. using some local versions)

#

This is still very vague to me: "when i try to do on servers". How did you push your live code to your website before?

somber sorrel
#

oh so i made a local server with node.js and used localhost:3005(for example) and tried the payment links(checkout.hrml, successful.html, etc) work fine or not. And it worked fine and now i want to implement this on the website that my friend and myself made so that we actually can add payment feature on the website.

somber sorrel
crystal grotto
#

That's right, as long as the webhook you're looking at was created in live mode

crystal grotto
somber sorrel
#

in the public file folder

crystal grotto
#

now i want to implement this on the website that my friend and myself made
is this website still in development, too?

somber sorrel
#

not fully finished but it's on the server so if you search the domains, you can visit them

#

this is the part that deals with create-checkout in checkout.html. I hid the DOMAIN but if i replace with my website's domain, it hsould work right?

crystal grotto
#

not fully finished but it's on the server
What server? I don't think this is the best channel for these questions since they're not really about developing with Stripe, it's more a question about web development more generally.

somber sorrel
#

thank you i will check on it. I will come back when i have stripe issues

#

Am, sorry where do you use publishable key specifically? because you use secret key in server.js. I don't know where to use it.

crystal grotto
#

Your publishable key is likely in client.js

somber sorrel
#

do i have to parse it? if so how i parse it?

#

// In production, this should check CSRF, and not pass the session ID.
// The customer ID for the portal should be pulled from the
// authenticated user on the server.
document.addEventListener('DOMContentLoaded', async () => {
let searchParams = new URLSearchParams(window.location.search);
if (searchParams.has('session_id')) {
const session_id = searchParams.get('session_id');
document.getElementById('session-id').setAttribute('value', session_id);
}

somber sorrel
crystal grotto
#

Which document from the Stripe website are you referencing?

somber sorrel
crystal grotto
#

This guide is specifically for using Stripe's hosted payment product, Stripe Checkout. A publishable key isn't necessary here since you're doing a full redirect to our hosted payment page.

somber sorrel
#

what do you mean by that?

crystal grotto
#

The alternative to this is using the Payment Element, which means you'd embed a payment form within a page that you own/host

somber sorrel
#

i thought i was doing that...?

crystal grotto
somber sorrel
#

um so i was doing checkout?

crystal grotto
#

The guide you linked uses Checkout, yes

somber sorrel
#

which is better using checkout or not checkout ?

nocturne ospreyBOT
crystal grotto
#

There isn't really a "better" option as it totally depends on what you want the customer experience to be, if you want to maintain a page with a PaymentElement, how much developer resources you have

somber sorrel
#

just myself so less management is using checkout?

crystal grotto
#

That's right, integrating with Checkout requires less code

delicate anchor
#

jay492-subscription-integration

somber sorrel
#

what's the embedding one called?

delicate anchor
#

but the embedded one is called PaymentElement

somber sorrel
#

oh sorry roadrunner already mentioned before ..

somber sorrel
#

um would be able to help me understand how the create-checkout-session works? How stripe is directing users to checkout page? Is there a way i specify the checkout page when i do it on server?

#

so if i click checkout button, i want to direct user to stripe checkout page but currently it is returning 404 not found

delicate anchor
#

there's no create-checkout-session. That's not really a thing unless you're solely talking about our demo example which is just a demo and should never be put in production

#

Are you an experienced developer who wrote the whole code end to end? Or is it more that you downloaded the basic example and deployed it to production?

delicate anchor
#

yes that is purely an example for a developer to play with, it's absolutely not real code you should put in production on your real website/app

somber sorrel
#

what do you mean by this?

#

you should put in production on your real website/app

#

if this isn't the right thing to follow, is there any materials that i can follow to put subscription function into my website?

delicate anchor
#

This is a basic sample app, like an hello world. It's for a developer to play with to understand how it works after they rebuild this entirely for their own code/website. There's no error handling, no security/protection, it's just a demo

#

it seems you cloned it and are now pushing it to your server which is unsafe

somber sorrel
#

Is there any place that i can learn the whole process?

#

like one by one?

delicate anchor
#

I mean you are in the right place, but it's still aimed at developers experienced with their own code/app/website. If you're starting from scratch you'll have to learn that part first or hire a professional to help you set all of this up

somber sorrel
#

i see

#

so do you recommend me to use nocode versions, then?

delicate anchor
#

yes that's what you likely should do in this case

somber sorrel
#

is it possible to users to access to customer portal with non-coding version? I want users to change the card-info or update/ delete it like the non-coding version.

delicate anchor
#

We have a no code customer portal option too yes

somber sorrel
#

Also, do you know how long does it take for does experienced people to set the non-coding payment feature on webisite?

somber sorrel
delicate anchor
#

yes

somber sorrel
#

sweeet, also, do you know how long does it take for experienced people to set the non-coding payment feature on webisite?

delicate anchor
#

I can't tell you I'm sorry, everyone is different

somber sorrel
#

how about the approximate estimate? Like a week or a month...

delicate anchor
#

I'm really sorry, I can't tell you. Some people build all of this in a few hours, others wil will take them a few weeks. It depends so much on your own needs, your existing systems, what you really want to handle, etc.

somber sorrel
#

fair enough

#

Does stripe provide any resources for building full non-coding feature?

delicate anchor
#

no we do not. We offer a lot of products and solutions even for no-code like PaymentLinks and the CustomerPortal but it's still something you need to set up based on your needs

somber sorrel
#

so you provides bits and peices not the full example and we have to customise by ourselves and put them togather?

delicate anchor
#

Yes

somber sorrel
#

i see thank you i will try the non-coding one, i will shout out if i need help again

delicate anchor
#

I'd recommend working directly with our support team if you have follow up questions about that part and they can guide you better!

somber sorrel
#

aren't you the one of them? or is there any other places that i can get help from?