#I will get tableflipped
1 messages ยท Page 1 of 1 (latest)
Hi! Let me help you with this.
What guides have you tried?
This is the standard guide to get a basic payment page: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=checkout&lang=node
I recommend Stripe Checkout (Prebuilt checkout page) - as this requires less code than a custom form embedded on your website.
Are you with me?
yes thanks for responding. So is this link for one i can embed into my own site? And can i collect customer details with it? I got the prebuilt one working a bit and I decided it wasn't for me
You can do a custom payment flow integration then: https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements&lang=node
Are you there? ๐
Yeah, thanks so i have just taken a look at it, and so is it just copying basically all of it and then i'll have a working base of the payment form?
Correct.
and how do i run it? i have started server.js but i am unsure of what link to go to test, as localhost:3000 can't GET /
There's a more interactive guide, that also let's you download the full working app: https://stripe.com/docs/payments/quickstart
and this is the same thing..?
How are you running your http server?
They might have minor differences, but the idea is the same, you get an embedded payment element on your page.
No, I mean your Node.js server. How do you run it? https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#retrieve-the-client-secret
Like this?
app.listen(3000, () => { ... });
I'm doing this, yeah app.listen(4000, () => { console.log('Running on port 4000'); }); and i am using :4000 in the URL bar
Cannot GET /
Perhaps you are not serving any page for the root path: /.
Are you using express.js?
You need to send your main HTML file: https://www.digitalocean.com/community/tutorials/use-expressjs-to-deliver-html-files#step-2-using-res-sendfile
OH WAIT
it's working, i don't think i did the first link properly, but the downloaded example worked! tysm!
Glad to hear that.
also one more question, can I also get the customer details like phone, billing/shipping address etc easily? and would they be saved in my stripe account with the transaction/payment info?
when i tried to do this nothing would work either..
You can use the Address Element: https://stripe.com/docs/elements/address-element/collect-addresses?platform=web
ok thank you!
Happy to help. Please, let me know if you have any other questions.
Ok, so it is now doing this... I assume that the address window is also meant to work?
the checkout.html is as following, It is the card example with what i hope was the correct parts of the program to successfully put the address form in as well. Is there anything that immediately comes to mind?
Hi ๐ jumping in as my teammate needed to step away. Are you seeing errors being thrown when you look at the developer tools for your page?
ok, so there are these, I am guessing it could be integrationerror?
OH WAIT i get it now
it was me trying to require the email
Maybe, that IntegrationError does look like it could be blocking things, but I don't think email is in the address element so I'm not confident on that.
Aahh, gotcha
ok so one more question about the data collection, so it doesn't seem to be outputting customer info here... is this the place it should be going?
i mean it gets the email, but i think thats the wrong field...
I don't think I have the full context on what was discussed before I joined the thread, are you creating Customer objects? What are you trying to accomplish?
I'm just trying to collect the customer's billing address, name, phone # etc and put it in stripe
Can you share the ID of the Payment (should start with pi_) that you used for testing? I think the details you're saving will be accessible via the Payment Method or Charge objects that are being created, but would like to double check that with how you're doing things.
pm_1N1rUqLgfkm1uKwPtcoqytQN
It does look like the email address is being associated with that Payment Method, when you retrieve the Payment Method do you see it in billing_details.email?
https://stripe.com/docs/api/payment_methods/object#payment_method_object-billing_details
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
sorry, but is he paymentmethod object meant to be in the page for the purchase? Down here?
I'm not sure, my team focuses on helping developers work with our API and are not as familiar with the Stripe dashboard.
oh ok. where could i access the paymentelement then?
You can use this endpoint to retrieve Payment Intents: (assuming you have the ID of the intent you want to look at)
https://stripe.com/docs/api/payment_intents/retrieve