APG PayAPG Paydocs

Marketplaces

Create marketplaces

POST/marketplaces

Create a marketplace. The response carries its first API key, once, and nowhere else.

Permissions

Required permission
marketplaces:update

Requires the `update` action on `marketplaces` for the supplied runtime context

Request body

This body is a tagged shape: type is always "MktpCmdCreate". Send it; more variants can be added, and a caller that switches on it keeps working when they are.

Discriminated by type
type = "MktpCmdCreate"
enterpriseIdEntIdrequired

Identifier of an enterprise.

Example ent_9f2Kd8QpLzXw

slugstringrequired

The marketplace's short name, used in URLs. Unchangeable once set.

businessNamestringrequired

Example Ada Lovelace

websitestringrequired

The marketplace's public website.

companyEmailstringrequired

Example ada@example.com

companyPhonestringrequired

Phone number in E.164 format.

Example +61400000000

merchantDashboardAccessbooleanrequired

Whether sub-merchants may sign in to their own dashboard. Required, there is no safe default.

Example true

shortenerBaseUristring

Base URL for the marketplace's short links, where it has its own.

Example https://example.com/callback

zendeskUserGroupIdinteger (int64)

The marketplace's Zendesk group, where support is routed through one.

Example 1250

curl -X POST https://api.tst.au.apgpay.dev/marketplaces \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "type": "MktpCmdCreate",
  "enterpriseId": "ent_9f2Kd8QpLzXw",
  "slug": "string",
  "businessName": "Ada Lovelace",
  "website": "string",
  "companyEmail": "ada@example.com",
  "companyPhone": "+61400000000",
  "merchantDashboardAccess": true,
  "shortenerBaseUri": "https://example.com/callback",
  "zendeskUserGroupId": 1250
}'

Responses

The response is a tagged shape: type is always "MktpCreateRspCreated". Switch on it; subtypes can be added, and a client that already reads it will not break.

Discriminated by type
type = "MktpCreateRspCreated"

A marketplace, a platform whose sub-merchants take payments under it.

apiKeystringrequired

The marketplace's first API key. Returned once, here, and never retrievable again, store it now.

Example
{
  "type": "MktpCreateRspCreated",
  "created": {
    "type": "MktpViewAttributes",
    "marketplaceId": "mktp_9f2Kd8QpLzXw",
    "enterpriseId": "ent_9f2Kd8QpLzXw",
    "slug": "string",
    "businessName": "Ada Lovelace",
    "website": "string",
    "companyEmail": "ada@example.com",
    "companyPhone": "+61400000000",
    "status": "Enabled",
    "merchantDashboardAccess": true,
    "selfManagedGrossSettlement": true,
    "shortenerBaseUri": "https://example.com/callback",
    "zendeskUserGroupId": 1250,
    "bankTransfers": {
      "type": "MktpBankTransfersAttributes",
      "bankAccountBsb": "string",
      "bankAccountNumber": "string",
      "payId": "string"
    },
    "sourceRules": [
      "string"
    ],
    "createdAt": "2026-08-19T04:21:07Z",
    "updatedAt": "2026-08-19T04:21:07Z"
  },
  "apiKey": "string"
}

Error responses