Identity you do not build
One provider, two-factor, consent and session lifecycle — already running before your first line of code.
For developers
Register an application, connect OpenID Connect in an afternoon, and list it in the catalog with plans, imagery and a launch link. Nine steps, in the order you do them.
const issuer = "https://apps-api.versified.com.gh/oidc";
// 1. Discover once, at boot.
const config = await fetch(
`${issuer}/.well-known/openid-configuration`,
).then((res) => res.json());
// 2. Send people to config.authorization_endpoint
// with scope=openid and a PKCE challenge.
// 3. Exchange the code at config.token_endpoint,
// then verify tokens against config.jwks_uri.The discovery document is the contract. If it disagrees with anything written down, it wins.
One provider, two-factor, consent and session lifecycle — already running before your first line of code.
Launch links arrive with the account and the person, and the API answers the rest.
Webhooks and capabilities are versioned contracts, so a second implementation is configuration.
The one rule
Start with the shape of the listing. Everything here is presentation — it makes the catalog legible without saying anything about how your product works.
| Field | Notes |
|---|---|
| name | Display name, 1–100 characters |
shortCode | Stable upper-case identifier. Metadata only — it grants no access |
| category | One of eight fixed categories |
| tagline + shortDescription | The one-liner and the tile summary |
| webUrl | Where launch redirects. What gets appended is declared in step 09, per membership |
Catalog writes go through the admin API with a bearer token that holds Manage applications. A new record starts as a draft, which means only admins can see it.
curl -X POST https://apps-api.versified.com.gh/appcenter/v3/admin/apps \
-H "Authorization: Bearer $APPCENTER_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Ledgerly",
"shortCode": "LEDGERLY",
"category": "Finance & accounting",
"tagline": "Bookkeeping that closes itself",
"webUrl": "https://app.ledgerly.com/launch",
"status": "draft"
}'Archive, never delete
The client is what actually talks to the identity provider. Its profile is fixed at registration and decides the grants, the PKCE requirement and whether a secret exists.
| Profile | Use it for | Grants | Secret |
|---|---|---|---|
public_pkce | Installed apps — iOS, Android, desktop | `authorization_code` + PKCE S256 | None |
confidential_web | Server-rendered web apps | Code + refresh, PKCE required | Yes |
confidential_service | Backend-to-backend calls | `client_credentials` only | Yes, no redirect URI |
curl -X POST \
https://apps-api.versified.com.gh/appcenter/v3/admin/apps/42/oauth-clients \
-H "Authorization: Bearer $APPCENTER_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"clientId": "ledgerly-web",
"name": "Ledgerly web",
"profile": "confidential_web",
"redirectUris": ["https://app.ledgerly.com/api/auth/callback"],
"resources": ["urn:versified:api:appcenter"]
}'The secret is shown once
Your application never collects a Versified password. It sends the browser to the provider, receives a code on the registered redirect URI, and exchanges it with PKCE.
const verifier = base64url(randomBytes(32));
const challenge = base64url(
createHash("sha256").update(verifier).digest(),
);
const params = new URLSearchParams({
response_type: "code",
client_id: process.env.VERSIFIED_CLIENT_ID!,
redirect_uri: process.env.VERSIFIED_REDIRECT_URI!,
scope: "openid profile email offline_access",
code_challenge: challenge,
code_challenge_method: "S256",
state, // store it with the verifier
nonce, // verify it in the ID token
});Refresh tokens rotate
Not every app keeps tokens on a server
Your backend holds a confidential_service client and mints tokens for appcenter:service. A user token is refused here on purpose — browsers talk to you, not to App Center.
| Endpoint | Returns |
|---|---|
GET /app/me | The application this client is bound to |
GET /app/users/:userUuid | One person, their business profile and their subscription |
GET /app/businesses/:accountUuid | The public business profile, for receipts and reports |
GET /app/subscriptions/:accountUuid | Plan identity only — code, tier, interval, dates, status |
curl -X POST https://apps-api.versified.com.gh/oidc/token \
-u "ledgerly-backend:$APPCENTER_SERVICE_SECRET" \
-d grant_type=client_credentials \
-d scope=appcenter:service \
-d resource=urn:versified:api:appcenter
curl https://apps-api.versified.com.gh/appcenter/v3/app/users/4f8a1c72-… \
-H "Authorization: Bearer $APPCENTER_SERVICE_TOKEN"{
"success": true,
"data": {
"user": {
"useruuid": "4f8a1c72-9d3b-4e10-8a55-6d2f9c0b7e31",
"email": "ama@ledgerly.com",
"firstname": "Ama",
"lastname": "Mensah",
"profileimage": null,
"createddate": "2025-02-11T10:04:51.000Z"
},
"business": {
"name": "Ledgerly Ltd",
"email": "billing@ledgerly.com",
"phone": "+233 24 000 0000",
"address": "12 Independence Ave, Accra",
"profileImage": null
},
"subscriptions": [
{
"id": 8712,
"planCode": "pro-monthly",
"planName": "Pro monthly",
"accessTier": "pro",
"interval": "monthly",
"legacyPlan": "pro",
"status": "active",
"startDate": "2026-04-01T00:00:00.000Z",
"endDate": "2026-12-01T00:00:00.000Z",
"active": true,
"daysRemaining": 23
}
]
}
}Prove the credential at boot
GET /app/me once on startup. It turns a misconfigured environment variable into an obvious log line instead of a mystery 403 an hour later.A plan is a priced SKU: a code, an interval, an amount in minor units. It is identity only — App Center stores what was bought and never what it allows.
curl -X POST \
https://apps-api.versified.com.gh/appcenter/v3/admin/apps/42/plans \
-H "Authorization: Bearer $APPCENTER_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Pro monthly",
"code": "pro-monthly",
"amountMinor": 4500,
"interval": "monthly",
"accessTier": "pro",
"status": "active"
}'Limits are yours
Set the status to published, then walk the launch flow with a real account. Launching is a redirect, not an API call: whatever you declared as launchParams for that membership is appended to your webUrl.
A launch link is not proof
?au=. Resolve the session first, then keep the hint only if the person genuinely belongs to that account.Subscribe to the events you act on, verify the delivery token against the App Center JWKS over the raw body, deduplicate on the delivery id, and acknowledge before doing work.
POST /hooks/appcenter HTTP/1.1
Host: ledgerly.com
Content-Type: application/json
User-Agent: AppCenter-Webhooks/1
X-AppCenter-Event: subscription.created
X-AppCenter-Delivery: 3f7c2b90-0e51-4a88-b1c4-2d9e6f0a7b13
X-AppCenter-Signature: v2=eyJhbGciOiJSUzI1NiIsImtpZCI6…const rawBody = await request.text();
const signature = request.headers.get("x-appcenter-signature")!;
const { payload } = await jwtVerify(signature.replace(/^v2=/, ""), jwks, {
issuer: ISSUER,
algorithms: ["RS256"],
});
if (payload.jti !== request.headers.get("x-appcenter-delivery")) {
return new Response("wrong delivery", { status: 401 });
}
const digest = createHash("sha256")
.update(rawBody, "utf8")
.digest("base64url");
if (payload.body_sha256 !== digest) {
return new Response("body mismatch", { status: 401 });
}
void enqueue(JSON.parse(rawBody));
return new Response(null, { status: 204 });| Property | Value |
|---|---|
| Timeout | 10 seconds; redirects are not followed |
| Retries | 7 attempts, first after 60 s, capped at 6 h, then exhausted |
| Guarantee | At-least-once, unordered — deduplicate and compare occurredAt |
| Divergence | Reconcile by pulling; nothing re-pushes on boot |
When App Center needs a question only you can answer, you publish an endpoint and declare it. A read is fanned out to every declarer and merged; a write is addressed to one.
| Capability | Kind | Answers |
|---|---|---|
assigned-apps | query | Accounts and people this person holds a membership for, in your product |
account-deletion | both | Open deletion requests, and moving one through your states |
curl -X PUT \
https://apps-api.versified.com.gh/appcenter/v3/admin/apps/42/capabilities/assigned-apps \
-H "Authorization: Bearer $APPCENTER_ADMIN_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"endpointUrl": "https://api.ledgerly.com/appcenter/assigned-apps",
"timeoutMs": 5000
}'GET https://api.ledgerly.com/appcenter/assigned-apps?userUuid=4f8a1c72-…
Authorization: Bearer <service token>
X-AppCenter-Capability: assigned-apps
X-AppCenter-Contract-Version: 2
X-AppCenter-Request-Id: 8e91c4d2-6b07-4f13-9a2d-1c5e7b0f3d84{
"success": true,
"data": {
"memberships": [
{
"shortCode": "LEDGERLY",
"membershipKey": "9a2c4e80-1f3b-4d55-8a07-6e2b9c1f4d33",
"account": {
"uuid": "0d6c1f8a-3c4e-4f2b-9a51-7b0e2d8c4a11",
"name": "Ledgerly Ltd",
"email": "billing@ledgerly.com",
"phone": null,
"address": null,
"imageUrl": null
},
"person": {
"uuid": "4f8a1c72-9d3b-4e10-8a55-6d2f9c0b7e31",
"name": "Ama Mensah",
"email": "ama@ledgerly.com",
"imageUrl": null
},
"launchParams": {
"au": "0d6c1f8a-3c4e-4f2b-9a51-7b0e2d8c4a11",
"uu": "4f8a1c72-9d3b-4e10-8a55-6d2f9c0b7e31"
}
}
]
}
}Every call carries X-AppCenter-Capability, X-AppCenter-Contract-Version and X-AppCenter-Request-Id. Refuse a revision you do not implement rather than guessing. A membership is the account, the person and the parameters you want appended to your webUrl — nothing else is read.
Integration shapes
The sign-in flow is the same everywhere. Where the token lives is your decision — and every answer has a price, paid somewhere else.
Tokens stay in your session store
An OIDC-aware proxy holds the cookie
The OS keystore
Nowhere — there is no session
The fifth shape is refused by design
A browser-only single-page app on your own domain cannot exchange a code: the token endpoint answers no CORS headers, so the page never reads a token. Why, and the two ways around it.
After the walkthrough
Endpoints, scopes, token lifetimes, event payloads and every error code — kept on pages built to be scanned rather than read end to end.
The platform team will review your client configuration, your receiver and your capability contract before you publish.