Skip to main content
GC Connect — Connect your GC Store — is a hosted authorization flow (“Login with GC”) for third-party tools. Instead of asking a merchant to find and paste an API key, you send them to a Tybrite-hosted consent screen; they approve the permissions you asked for, and your server receives a key pair (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.
If you’re building your own storefront against your own store, you don’t need Connect — just use the API key from your dashboard.

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

Build the authorization URL and redirect the merchant’s browser to it. Generate a random state 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 your redirect_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’s sk and call the API as that store:

4. Sign write requests

Reads need only the sk. 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.
An unsigned or mis-signed write returns 401 invalid_signature.
Store the sk and the signing_secret securely server-side immediately — both are returned only once and cannot be retrieved later. Treat them like passwords: keep them in a secrets manager, never in client-side code, logs, or version control.

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.
Connecting the same merchant again updates that one subscription rather than creating duplicates, and it never touches an endpoint the merchant created by hand. If you did not register a webhook URL, 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 the scope 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

The environment 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.
The merchant sees which environment you’re requesting on the consent screen, so be explicit. The returned 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 the pair_id you saved at exchange time) — for example, when a merchant cancels their subscription on your platform.
To see every store currently connected to your application — the data behind a merchant’s Connected Apps panel — call listConnectSessions with a secret key:

Security checklist

  • Generate a fresh random state per authorization and verify it on the callback (CSRF protection)
  • Run the code-for-keys exchange server-side only — never expose client_secret to a browser
  • Store each merchant’s sk in a secrets manager, scoped to that merchant
  • Store each merchant’s signing_secret alongside 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_id so you can revoke the connection later
  • Use HTTPS for your redirect_uri, and register it exactly in the Developer Portal

SDK reference

See the GcConnectService SDK reference for full method signatures, or the API Reference for the raw endpoints.