How to Get API Keys
Keys link your system to a specific project in Trybit: they let the service know who sent a request, and let you know that a notification was actually sent by Trybit. Each project has its own set of keys.
How to get the keys
Sign up in the Trybit dashboard.
Add a project in the "Add project" section: select the project type, complete the "About the project" step and pass "Verification".
Select an integration method at the "Integration and API" step.
Copy the keys at the "Keys and test payments" step — this is where the API KEY, SHOP ID and SECRET KEY are issued.
After the project is created, the keys are always available in the project page header: "My projects" → the relevant project. The SECRET KEY is hidden — to view it, click "Show".
Which keys are needed and where they are used
Key
Purpose
Where it is used
API KEY
Authorizing API requests
The Authorization header of every request: Token <API KEY> — see Request Authorization
SHOP ID
Project identifier
The shop_id parameter when creating an invoice, HTML widget code, CMS module settings
Settings that can be changed only in test mode
All parameters of the "Integration and API" section — integration method, success payment URL, failure payment URL, notification URL and POSTBACK format — can be changed only while test mode is enabled. After exiting it, the section is locked; to make changes, re-enable test mode, and the project will be sent for review again.
How to store the keys
Store keys on the server — in environment variables or a secure configuration store.
Do not place the API KEY and SECRET KEY in page code, mobile apps or public repositories.
Do not share keys with third parties, including in support requests — the SHOP ID is sufficient for diagnostics.
Restrict employee access to project settings — see Team and Access.
What to do if a key is compromised
Enable test mode in the current project and add a new project in the "Add project" section — new keys are issued at the "Keys and test payments" step. The keys of an existing project cannot be changed.
Replace the API KEY, SHOP ID and SECRET KEY in the integration on your side, test it and submit a request to exit test mode for the new project.
Review recent operations in the "Payments" and "Withdrawals" sections.
Make sure two-factor authentication is enabled for the account.
Last updated
Was this helpful?
