Platform Businesses Guide
The Platform Business API lets you create and manage businesses on behalf of your platform's users. This is useful when onboarding new businesses programmatically — you create the business entity, attach members by email, and optionally auto-grant your platform access scopes.
Required scopes
business:create, business:read, business:update
How it works
When you create a business via the Platform API, the system:
- Creates the business entity with the provided name and address
- Looks up each member by email — if an Oncade account exists, they are attached immediately
- For members without an account, a placeholder is created so they can claim it later
- If
grantScopesis provided, an automatic permission grant is created for your platform
Members must complete account setup. Creating a business via the API attaches members by email, but those users still need to:
- Create their Oncade account (or sign in if they already have one)
- Set up their payout wallet to receive funds
Until the business owner completes wallet setup, the business cannot receive payments through invoices or distributions. Direct your users to oncade.gg to complete their account setup.
Creating a business
curl -s -X POST \
-H "Authorization: Bearer $PLATFORM_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Games LLC",
"address": {
"line1": "123 Main Street",
"line2": "Suite 400",
"city": "Austin",
"state": "TX",
"postalCode": "78701",
"country": "US"
},
"members": [
{
"email": "owner@acmegames.com",
"roles": ["ADMIN"],
"isOwner": true
},
{
"email": "finance@acmegames.com",
"roles": ["VIEWER"]
}
],
"grantScopes": [
"invoice:create",
"invoice:read",
"invoice:send",
"distribution:create",
"distribution:read"
]
}' \
https://<host>/api/v1/platform/businessRequired fields
| Field | Type | Description |
|---|---|---|
name | string | Business name. Must be unique across the platform. |
members | array | At least one member. Each entry requires email and roles. |
Member roles
| Role | Permissions |
|---|---|
ADMIN | Full access to all business resources. Required for the business owner. |
GAME_EDITOR | Can create and edit games, invoices, and other business content. |
VIEWER | Read-only access to business resources. |
Set isOwner: true on exactly one member to designate them as the business owner. The owner's payout wallet is used as a fallback when the business does not have a dedicated payout wallet configured.
Address format
The address fields use US-style naming conventions but work for any country or region. Map your local address components to the following fields:
| Field | Required | US example | International usage |
|---|---|---|---|
line1 | Yes | 123 Main Street | Street address, building number, or equivalent |
line2 | No | Suite 400 | Apartment, floor, unit, or additional address detail |
city | Yes | Austin | City, town, municipality, or locality |
state | Yes | TX | State, province, prefecture, region, or equivalent subdivision |
postalCode | Yes | 78701 | ZIP code, postal code, or postcode in any local format |
country | Yes | US | ISO 3166-1 alpha-2 country code (e.g., US, GB, JP, DE) |
International addresses. While the field names follow US conventions (state, postalCode), they accept values from any country. For example, a Japanese address would use "state": "Tokyo", "postalCode": "150-0002", "country": "JP". A UK address would use "state": "England", "postalCode": "SW1A 1AA", "country": "GB".
International address example
curl -s -X POST \
-H "Authorization: Bearer $PLATFORM_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{
"name": "Tokyo Digital Co",
"address": {
"line1": "1-2-3 Shibuya",
"city": "Tokyo",
"state": "Tokyo",
"postalCode": "150-0002",
"country": "JP"
},
"members": [
{ "email": "admin@tokyodigital.co", "roles": ["ADMIN"], "isOwner": true }
]
}' \
https://<host>/api/v1/platform/businessOptional fields
| Field | Type | Description |
|---|---|---|
logoUrl | string | URL to the business logo image |
address | object | Business address (see fields above). When provided, all required address fields must be present. |
payoutWallet | string | Wallet address for receiving payments. Can also be configured by the business owner later. |
grantScopes | array | Scopes to automatically grant your platform on this business. Skips the manual grant flow. |
Auto-granting platform access
When you include grantScopes in the create request, a permission grant is automatically created for your platform on the new business. This eliminates the need for a separate link session or invite flow.
The scopes you request must be a subset of your platform's approved scopes. For example, if your platform has invoice:create and distribution:create approved, you can auto-grant either or both to a new business.
Managing businesses
Getting business details
Retrieve business information using the X-Target-Business-Id header.
curl -s \
-H "Authorization: Bearer $PLATFORM_KEY" \
-H "X-Target-Business-Id: $BIZ_ID" \
https://<host>/api/v1/platform/businessUpdating a business
Use PATCH to update business fields. At least one field must be provided.
curl -s -X PATCH \
-H "Authorization: Bearer $PLATFORM_KEY" \
-H "X-Target-Business-Id: $BIZ_ID" \
-H "Content-Type: application/json" \
-d '{
"name": "Acme Games Inc",
"address": {
"line1": "456 Commerce Blvd",
"city": "Austin",
"state": "TX",
"postalCode": "78702",
"country": "US"
}
}' \
https://<host>/api/v1/platform/businessUpdatable fields: name, logoUrl, address, payoutWallet.
Payout wallet setup
The payout wallet determines where payments are routed for invoices and distributions. It can be configured in three ways:
- At creation time — pass
payoutWalletin the create request - Via API update — use
PATCH /v1/platform/businessto set it later - By the business owner — the owner configures it through the Oncade dashboard
A payout wallet is required for payments. Platform invoice creation requires the business to have an explicit payoutWallet configured. If the wallet is not set, the API returns a 400 error. There is no automatic fallback to the owner's personal wallet for platform-created invoices.
Ensure your onboarding flow either sets payoutWallet at business creation time or prompts the business owner to configure it through the Oncade dashboard at oncade.gg before creating invoices.
API Quick Reference
All business endpoints are under /v1/platform/business.
| Method | Path | Scope | Purpose |
|---|---|---|---|
POST | /business | business:create | Create a business with members |
GET | /business | business:read | Get business details |
PATCH | /business | business:update | Update business details |