#gaz_terminal-example-backend-livemode
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.
โฑ๏ธ 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/1345090289454551182
๐ 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.
- gaz_api, 29 minutes ago, 25 messages
i set up the stripe terminal backend, and i want to use it in production mode so i set STRIPE_ENV to production however when i try to use the tap to pay it says
Error: you used a live mode secret key to set up the example backend. Please use your test mode secret key. For more information, see https://stripe.com/docs/keys#test-live-modes
Hi! The 'example backend' is not meant to be used as is in production, it's just meant as a sample, a place to start.
oh, well surely there is a way to use it still?
Using unmodified examples like this in production is dangerous unless you've made it secure, and of course doesn't actually do what your final application will do.
Also testing in livemode is a violation of (at least) Stripe's Terms of Service.
What is it that you're trying to do exactly?
we just need to take credit card payments from within an app ive written
and we want to use this example backend for it, i dont want to write something new we have taken a long time just to get this to work
so i just need a way to make the example backend work in production
Did you change the code from the example?
no, but i see that i can probably just remove that error
and it should probably work?
Well, no, because the example doesn't actually do anything.
Like, you need to build your server-side application logic and everything too right?
well everything is complete on the app and the server side, we just need to receive payments now
we designed all this to use stripe to receive the payments on the phone using the app, and assumed that was the purpose of all of this
like what is the purpose of having the credit card screen come up and read the nfc etc and all of that for no reason?
all i need to do is receive the payment into our stripe account when the card is tapped, without error.
Cool. Does all that work in test mode?
yes all works in test mode, just need to be able to get the money from the card swipe into our stripe account
If it all works in testmode, then you should be able to make it work in livemode by modifying where that error is happening, and it should work.
its all for staff to use so only staff users will ever use the app, customer just swipes card when required
i see where i could remove the error and the "return", but would the example backend actually cause the money to appear in the stripe account?
gaz_terminal-example-backend-livemode
DId it make test money show up in your test account?
hmm, im not sure, i didnt realise that could be done
i thought as soon as the credit card screen went green and it looks like the card worked, that in production mode it would do the rest of the work to really accept the payment
I would suggest you re-read the docs, and work through all of this in testmode so that it does everything you need it to do in testmode before you consider switching it to livemode.
I've got to run, but my colleague is here if you have any further questions - but I would definitely suggest just sitting down and working through the docs and code at this point.
hmm im confused, spent months to get this far
thanks, would be better if there was a "real backend" i can use
i kind of need to know what the backend does then
anyone here? lol
i need to know what i need to fix/change/implement to make this work
someone scans card, it speaks to the example-backend, but how do we actually make the transaction real and appear in the stripe account. and what is the purpose of the example backend if it cannot do this, seems that it is literally entirely pointless it even existing if it cannot do that?
Hi, stepping in here. Sorry, I was helping on another thread .I did not realize you were referring to terminal on the previous thread. I should have clarified.
yeh im using this thing https://github.com/stripe/example-terminal-backend
we need to be able to actually process the transaction properly
we do have a php guy who said a while back that he can process payments to stripe using an api he wrote, so if i understand it correctly we could go from the credit card scan screen to his api to make the genuine payment, and not use the example backend
took us a long time to get the backend working and to fetch the token etc, we are even paying render to host this with no downtime, but i cant understand why if we cant use it
also the credit card screen etc will not even work without speaking to the example backend to get the token, so we might need to keep that too, very confusing to simply make a payment on an app using a card.
Let me grab a teammate who have more exeprtise with Terminal. Thank you for your patience.
thanks
i wonder if all the stripe tap 2 pay sdk does is simply read all the info from the card, ready to pass to some other api? but, does it read everything? including csv etc? and if so how can we send that information safely to our php api to do the transaction "for real"
Hello! I'm taking over and catching up...
thanks Rubeus
im very worried now because i dont know how to proceed
and ive wasted so much time on this
Read through the thread, and I want to reitterate what was shared earlier: the example backend you're using is just that, an example. It's meant as a minimal example for you to experiment with and use as a reference, it's not production-ready code and should not be used in live mode.
A Terminal integration like the one you're trying to build requires you to build your own custom backend to meet your specific needs. If you don't have the development resources to build that you can either hire a developer or use an off-the-shelf third-party Terminal solution. There are several options here, for example: https://stripe.partners/?f_stripe-solution=in-person-payments
that backend should not exist then, it just wastes time and money for everyone
Regarding your question about the Tap to Pay SDK, it does not do what you described above, and is significantly more complicated than that. There are a lot of rules and regulations around taking in-person card payments which require a lot of complexity under the hood to make things work.
can u point me to "real" backends that i can buy off the shelf
so what does the tap2pay sdk do and how do we actually make real payments?
I don't know of anyone who makes such a thing. It would be incredibly difficult to make a generic backend that worked with various custom frontends. Everything I know of that would be a turn-key solution is a complete solution, not just the backend part.
and if my php guy can handle the payments using his code (not sure he can) how can i pass what the tap to pay read to his api?
Your two options are to build a full custom solution yourself, including the frontend and backend, or to use a third-party system that someone else has built.
hmm, we have everything implemented and working, we only need the bit which actually transfers the money when the card is swiped
If you have someone who knows PHP they should be able to help you with the backend. That person would need to read through our Terminal documentation and work with whomever built your mobile app to come up with a complete solution.
right, yeh i wrote the app, and he did say he could handle stripe transactions, so together hopefully we can make it work
but im not sure what the tap 2 pay sdk outputs, in order to use it with the php?
It's not a matter of a simple output. The app and the backend need to talk to each other at several points throughout the process and coordinate a lot of functionality. It's much more involved than you're describing.
Depending on your use case and business needs it might be relatively quick to build what you need, but it could also be something that takes a fair bit of effort. It depends on the specific functionality you require, but having someone who knows both the client side of things and the server side of things working together is key to getting it up and running.
hmm thats a huge shame, spent so long getting this to work, and stripe seems like it should be able to simplfy the process. I simply want to receive payments in an app, surely there is an off the shelf solution to this
we dont need any functionality just to be able to receive payment
There are many off-the-shelf solutions for this, but they're all by third parties. Stripe doesn't provide one.
i mean this would be very easy if we just forced the user to enter their credit card details i would think
we were just trying to simplify it with a swipe
That would require you to meet a lot of PCI compliance burdens, and it would still require a backend component you'd have to build.
yeh, im beyond confused now lol
i thought we were finished here
seems like ive been wasting my time
I recommend you work with the developer you mentioned who knows PHP and see what they think about finshing what you've built so far.
yes, i will arrange a meeting with him
i dont quite understand the point of the swipe though
can u briefly explain what happens when a card is swiped?
i assumed it did all the magic for you and the money would magically appear in the stripe account
Do you mean tapped or swiped? You mentioned Tap to Pay specifically before.
erm, yeh tap sorry, i thought they were the same thing
No, they're different. Swiping requires reader hardware which reads the data off the card's magnetic strip.
yeh we were trying to do this without a card reader, just using the phone, but if it is easier with a card reader we will probably go that route
i thought it was so amazing when i realised it could be done on the phone without a reader
For a tap, the card's NFC chip communicates with the NFC chip in your phone to exchange information required to process the transaction. Setting up the NFC reader on your phone to accept those taps, then decoding and using the information provided by the card is handled by both the Stripe Terminal SDK running on the phone and the Stripe code running on your server, both of which talk to the Stripe API to process payments.
right so i have all that working on the phone, and i think we already accept stripe payments properly using the API for other things
so we just need to link them somehow
Yep, by building a backend.
yes we have a backend and already receive many payments using stripe
so the confusing bit is what does the terminbal sdk in the app do, to contact the backend, and what does it send
Yeah, so whoever built that backend should be able to help you extend it to support Terminal and Tap to Pay.
What it specifically does depends on what you built and what features you're using.
right, well as far as i know we just want to get money from the customers card and transfer it
nothing fancy
but yeh i will have to speak to him
i really feel like stripe is misleading people with all of this
it should work as is suggested
they make it sound so simple and easy
What specifically are you referring to?
No, I mean what specific part of Stripe made it sound easier than it actually is? Was it a certain web page? A doc? A guide?
ah yeh its been a while, i have wasted 4 months just getting this to work!.. and it all started with a web page that made it seem very easy.
it has been very difficult to get the card screen even working and being able to swipe on it.. and now i find that it basically does nothing once you swipe
i just hope our php guy knows whats going on but i doubt he will know how to interface with the android app
Our documentation should make that part clear.
he is basically just writing php scripts and at some point the info will need to flow from the app to the php using a normal http call
and i dont know what info that is or even if the terminal sdk collects or outputs anything
the documentation is sadly lacking, confusing, points to old resources all over
most ppl in these help channels do not even know the example backend exists*
If you work with him through it step by step I think it will become more clear.
yes i hope so
i will probably advise against stripe for future projects of my own
need something that makes it far easier
but everyone always says use stripe its simple!
be easier to use paypal, could be done in no time
You should go with whatever works best for you and your business, for sure.
yep
i assume the client uses stripe due to low fees or something
i mean google pay could prob do all this too i assume or apple pay
ive not taken many payments from within an app so i assumed it would be very simple by now
anyway thanks for your help, i appreciate it,
would be good to see some docs that show how to actually do this if they exist
No problem! Good luck with getting it all working!
like what do you have to do after the card is tapped, in terms of coding, what has to happen to process the payment
The main docs for Terminal are here: https://docs.stripe.com/terminal
and to be honest i would buy a library or something if it did it all for me
That's where you and your backend developer should start when you collaborate on this.
great thanks
haha i think these are the docs
that make it sound so simple
when in fact its like a phd just making one transaction ๐
Yeah, Stripe provides tools and APIs for you to build custom Terminal solutions that meet your needs. We try to make the development process as easy as possible, but it is still a development process and requires experienced frontend and backend developers to build everything required.
yeh
ive been making mobile apps now for 23 years
and it still managed to con me into thinking it would work
hopefully something can be worked out, or it will be a nightmare starting again
so this example app https://github.com/stripe/stripe-terminal-android
thats what i based my code on
and the example back end
still cant understand how they cant work together to complete it, its right ther ein the docs telling you to use them
They can and do work together just fine, but the backend is an example. It's not production ready, it's just a reference for development and testing. You need to build your own production-ready backend with your PHP developer.
yeh but what i dont understand is what gets transferred betweeen them
the app must send something to the backend
but what does it send?
You can work with your PHP developer to understand that.
Or you can read through the docs.
read them docs to death but i must have missed some pages
I do know, but it's out of scope for me to explain it in detail when you have access to both our docs and the code itself, both of which provide what you're asking.
lol
i wish the code did show it!
we have just proven that it does not
and i cannot find it in the docs
I understand your project isn't going as planned and you're frustrated, but I don't know how much more help we can provide here. You have a next step, which is working with your PHP developer to build the backend you need. Unless you have any other outstanding questions I think we're good to close this thread, correct?
i wonder if it would be easier to have the app go to a webpage,
well i guess you can, you have been more helpful than the other guys but still seem to shy away from actually really helping
not sure why stripe does that
i sitll cannot find what info is passed to the backend etc
and it is not in the docs as far as i can see
It is in the docs. It's also in the example backend code; you can see exactly what that code is doing by reading it.
I'm referring to this collectively: https://github.com/stripe/example-terminal-backend
Not just one file.
yeh but thats the only one with actual logic in really
The bulk of the functionality is in that file, yes.
yeh its all very simpole and generic code
i guess somehow the goodness is in the json it sends back and forth
anyway yeh i guess we cant do much more here
thanks a lot for the help
im frustrated as hell, but hopefully i will survive ๐
No problem! I think working with your PHP developer will help a lot and get you back on track!
yes i think so, i will set up a meeting with him tomorrow!
Have a great day and great weekend!
thanks again, have a good weekend.