Docs
Dashboard

Merchants

Create and manage merchant accounts, stores, Stripe Connect onboarding, and team members. A merchant is the top-level commerce entity that owns one or more stores.

Authentication

All merchant endpoints require a valid JWT or API key. The authenticated user becomes the owner of merchants they create.

Endpoints

POST/merchantsCreate a merchant
GET/merchantsList merchants for the authenticated user
GET/merchants/:idGet merchant details
PATCH/merchants/:idUpdate merchant profile
POST/merchants/:id/storesAdd a store to a merchant
GET/merchants/:id/storesList stores for a merchant
POST/merchants/:id/onboardInitiate Stripe Connect onboarding
GET/merchants/:id/onboard/statusCheck Stripe onboarding status
POST/merchants/:id/team/membersInvite a team member
GET/merchants/:id/team/membersList team members
PATCH/merchants/:id/team/members/:memberIdChange a member's role (admin or owner)
DELETE/merchants/:id/team/members/:memberIdRemove a member, or leave the team yourself
GET/merchants/:id/team/meYour own role on this merchant

Create a Merchant

POST/merchantsCreate a merchant
Request Body
{
"name": "Acme Electronics",
"slug": "acme-electronics",
"businessType": "company",
"country": "US"
}
FieldTypeRequiredDescription
namestringYesBusiness name (max 255 chars)
slugstringYesURL-safe identifier (max 100 chars)
businessTypestringNoindividual or company
countrystringNoTwo-letter ISO country code

The merchant is created with the authenticated user as owner.

Update a Merchant

PATCH/merchants/:idUpdate merchant profile
Request Body
{
"name": "Acme Electronics LLC",
"businessType": "retail",
"status": "active"
}
FieldTypeRequiredDescription
namestringNoBusiness name (max 255 chars)
businessTypestringNoindividual, company, restaurant, retail, services, events, or digital
countrystringNoTwo-letter ISO country code
statusstringNoactive, suspended, or pending

Stores

POST/merchants/:id/storesAdd a store to a merchant
GET/merchants/:id/storesList stores for a merchant
Request Body
{
"name": "Acme US Store",
"domain": "shop.acme.com",
"currency": "USD",
"timezone": "America/New_York"
}
FieldTypeRequiredDescription
namestringYesStore name (max 255 chars)
domainstringNoCustom domain (max 255 chars)
currencystringNoThree-letter ISO currency code (default USD)
timezonestringNoIANA timezone (max 50 chars)

Stripe Connect Onboarding

POST/merchants/:id/onboardInitiate Stripe Connect onboarding
GET/merchants/:id/onboard/statusCheck onboarding status

POST /merchants/:id/onboard returns a Stripe Connect Express onboarding URL. Redirect the merchant to complete KYC/KYB. Poll the status endpoint to determine when the account is ready to accept payments and receive payouts.

Onboarding gating

Payouts are only available once onboarding status reports the account as fully verified. Gate payout UI on the status endpoint.


Team Members

POST/merchants/:id/team/membersInvite a team member
GET/merchants/:id/team/membersList team members
PATCH/merchants/:id/team/members/:memberIdChange a member's role (admin or owner)
DELETE/merchants/:id/team/members/:memberIdRemove a member, or leave the team yourself
GET/merchants/:id/team/meYour own role on this merchant
Request Body
{
"userId": "usr_abc123",
"role": "admin"
}
FieldTypeRequiredDescription
userIdstringYesThe user to add to the merchant team
rolestringYesowner, admin, manager, member, or viewer

Roles are enforced on every merchant-scoped API route (a 403 names the role an action needs):

RoleCan do
viewerRead every merchant endpoint
memberDay-to-day writes: products, orders, payment links, checkouts, customers, loyalty
managerRefunds, order cancellation, product deletion, campaign sends, x402 endpoints, webhook retries
adminPayouts, credit lines, webhooks, integrations, store settings, onboarding, team management (up to admin)
ownerEverything, including managing owners and admins

Only admins and owners manage the team, and nobody can grant a role above their own. Anyone can leave a team with DELETE /merchants/:id/team/members/:memberId on their own membership. A merchant always keeps at least one owner: the last owner cannot be removed or demoted. Changing a merchant's status is reserved for Gully Pay staff.