sk + pk) scoped to that merchant’s store. The keys are permanent — they stay active until the merchant disconnects your app or you revoke them.
Approval required. Your application must be approved by Galactic Core before the Connect flow will work. Apply via the Developer Portal to receive your
client_id, client_secret, and registered redirect URIs.When to use it
Use GC Connect when you’re building a tool that acts on behalf of other merchants — an app, a SaaS integration, an agency dashboard — and you want them to onboard in one click:- A marketing or analytics tool that needs read access to a merchant’s catalog and orders.
- A fulfillment or ERP integration that creates and updates orders for many stores.
- Any product where each customer is a different Tybrite merchant and you don’t want to handle their keys manually.
The flow
GC Connect is a five-step, redirect-based handshake. The merchant’s browser carries them through the consent screen; your server does the final code-for-keys exchange.1
Redirect to the consent screen
Send the merchant’s browser to the hosted consent page with your
client_id, redirect_uri, the scope you need, and a random state value (which you store to verify later).2
Merchant approves
The merchant logs in (if they aren’t already) and reviews exactly which permissions and which store they’re granting. They click Authorize.
3
Redirect back with a code
Galactic Core redirects the browser back to your
redirect_uri with a short-lived, single-use code and your original state.4
Exchange the code (server-side)
Your server calls
connectToken with the code plus your client_id and client_secret. You get back the merchant’s sk, their pk, and a signing_secret for signing write requests.5
Store the credentials securely
Save the
sk and the signing_secret server-side — both are shown only once. The sk authenticates every call you make for that merchant; the signing_secret signs the write requests that require a signature. The pk is safe for browser/mobile read operations.Quick start
1. Send the merchant to the consent screen
Build the authorization URL and redirect the merchant’s browser to it. Generate a randomstate and stash it in the user’s session — you’ll check it against the value that comes back to defend against CSRF.
2. Handle the callback and exchange the code
When the merchant approves, their browser lands back on yourredirect_uri with ?code=…&state=…. Verify the state, then exchange the code for keys from your server — never from a browser, because it requires your client_secret.
3. Act on the merchant’s behalf
Spin up a client with the merchant’ssk and call the API as that store:
4. Sign write requests
Reads need only thesk. Creating or updating an order, and initializing a payment, additionally
require a signature computed with the signing_secret you stored at step 2:
The signed string is the timestamp, a literal
., and the exact request body you send — sign the
serialized bytes, not a re-serialized copy, or the signature won’t match. Signatures are accepted
within five minutes of their timestamp.
401 invalid_signature.
Automatic webhooks
If your application processes events — reacting when a promotion goes live, a review is approved, or a store’s data changes — you can have a webhook subscription created for you the moment a merchant connects, with no separate setup step for them. Register a webhook URL on your application (in the developer portal, when you register or edit the app). From then on, every time a merchant connects, Galactic Core automatically creates a signed webhook subscription for their store pointing at that URL. The token-exchange response includes the subscription:webhook_endpoint.signing_secret is a different secret from signing_secret. signing_secret
signs your outbound write requests (creating orders, initializing payments);
webhook_endpoint.signing_secret verifies Galactic Core’s inbound event POSTs to your receiver. Store
both, keep them apart.webhook_endpoint is absent and the merchant (or your app) can still create one via the
Webhooks API. The full event catalogue — including the store-lifecycle and
feature-availability events that make this useful — is in the Webhooks reference; the
pattern for keeping a storefront in step with a store is in
Automated workflows.
Scopes
Scopes are passed space-separated in thescope parameter, and the merchant sees exactly the set you asked for on the consent screen.
They are enforced on every request: a key calling an endpoint it was not granted is rejected with 403 insufficient_scope. A scope requested but never used therefore costs nothing at runtime and everything on the consent screen, which is the reason to request the narrowest set the integration needs.
Sandbox vs production
Theenvironment parameter on the authorization URL decides whether the resulting key pair touches the merchant’s live data or isolated test data:
sandbox(default) — connect to test data while you build. Nothing you do affects the merchant’s real store.production— connect to live store data. Use this once your integration is ready.
environment field on the key pair confirms what was granted.
Lifecycle & revocation
Connected keys are permanent — they don’t expire on a timer. A connection ends in one of two ways:- The merchant disconnects you from their store’s Integrations → API Keys → Connected Apps panel. Galactic Core deactivates the key pair automatically — you don’t need to do anything.
- You revoke the connection with
connectRevoke(passing thepair_idyou saved at exchange time) — for example, when a merchant cancels their subscription on your platform.
listConnectSessions with a secret key:
Security checklist
- Generate a fresh random
stateper authorization and verify it on the callback (CSRF protection) - Run the code-for-keys exchange server-side only — never expose
client_secretto a browser - Store each merchant’s
skin a secrets manager, scoped to that merchant - Store each merchant’s
signing_secretalongside it — it is returned only once, and without it you cannot create orders or initialize payments for that merchant - Request the minimum scopes your integration needs
- Save the
pair_idso you can revoke the connection later - Use HTTPS for your
redirect_uri, and register it exactly in the Developer Portal

