#fengod_api
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/1440945675582967919
📝 Have more to share? Add more details, code, screenshots, videos, etc. below.
Hey! do give me some time to take a look at this
No worries. To add to my question, i'd also like to know if the restricted key can register a reader to. Thanks!
Hey! Thanks for waiting, yes you can use restricted keys to limit the functions that your terminal can call on your backend service
You can choose which Permission to assign to the restricted key. E.g. Common terminal Methods called on the backend service
You can pass these restricted keys to the Stripe package when running your backend service. And example in ruby code below:
`
require 'sinatra'
require 'stripe'
This is your test secret API key.
Stripe.api_key = 'rk_test_xxxxxxx'
set :root, File.dirname(FILE)
set :public_folder, -> { File.join(root, 'public') }
set :static, true
set :port, 4242`
You can try this by downloading our quickstart guide here: https://docs.stripe.com/terminal/quickstart?lang=ruby&platform=web
Creating a Restricted Key and pass that rk_test_xx in: https://docs.stripe.com/keys#create-restricted-api-secret-key
And test it out against your use case
if the restricted key can register a reader to.
Could i clarify, what do you mean by register to a reader? Like pass it to the JS SDK to load?
I mean registering a reader
not registering 'to' a reader
Also, can simulated readers be used with Stripe.JS?
You mean registering the reader as detailed in this section?
If so, then yes, i just tried it using an rk_test_ key, but do note that it might prompt you for a password as such
Enter host password for user 'rk_test_xxx"
Also, can simulated readers be used with Stripe.JS?
Ah, do you mean, can it be used with Stripe’s browser-side JavaScript library?
The Terminal JS SDK is different from the Broswer side JS SDK
The Terminal quickstart guide useses the Terminal JS SDK
Apologies! Should have clarified this earlier!