Create marketplaces
/marketplacesCreate a marketplace. The response carries its first API key, once, and nowhere else.
Permissions
marketplaces:updateRequires 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.
typetype = "MktpCmdCreate"enterpriseIdEntIdrequiredIdentifier of an enterprise.
Example ent_9f2Kd8QpLzXw
slugstringrequiredThe marketplace's short name, used in URLs. Unchangeable once set.
businessNamestringrequiredExample Ada Lovelace
websitestringrequiredThe marketplace's public website.
companyEmailstringrequiredExample ada@example.com
companyPhonestringrequiredPhone number in E.164 format.
Example +61400000000
merchantDashboardAccessbooleanrequiredWhether sub-merchants may sign in to their own dashboard. Required, there is no safe default.
Example true
shortenerBaseUristringBase 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.
typetype = "MktpCreateRspCreated"A marketplace, a platform whose sub-merchants take payments under it.
typeenumrequiredMktpViewAttributesmarketplaceIdMktpIdrequiredIdentifier of a marketplace.
Example mktp_9f2Kd8QpLzXw
enterpriseIdEntIdrequiredIdentifier of an enterprise.
Example ent_9f2Kd8QpLzXw
slugstringrequiredThe marketplace's short name, used in URLs and dashboards. Unique, and set at creation.
businessNamestringrequiredExample Ada Lovelace
websitestringrequiredThe marketplace's public website.
companyEmailstringrequiredWhere to contact the marketplace.
Example ada@example.com
companyPhonestringrequiredPhone number in E.164 format.
Example +61400000000
statusMktpStatusrequiredEnabledDisabledUnknownmerchantDashboardAccessbooleanrequiredWhether sub-merchants may sign in to their own dashboard.
Example true
selfManagedGrossSettlementbooleanrequiredWhether the marketplace collects its own sub-merchants' invoice fees. This decides who may mark a merchant invoice paid.
Example true
shortenerBaseUristringBase URL the marketplace's short links are issued under, 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
How the marketplace is paid by bank transfer. Absent where you may not read its financials, which is not the same as it not being set up.
typeenumrequiredMktpBankTransfersAttributesbankAccountBsbstringrequiredBank-state-branch of the account the platform issued.
bankAccountNumberstringrequiredAccount number of that account.
payIdstringrequiredThe PayID the platform issued. This is what to give a payer.
sourceRulesarray of stringThe rules deciding which payment sources its sub-merchants may take. Empty means no restriction.
createdAtstring (date-time)requiredExample 2026-08-19T04:21:07Z
updatedAtstring (date-time)requiredExample 2026-08-19T04:21:07Z
apiKeystringrequiredThe marketplace's first API key. Returned once, here, and never retrievable again, store it now.
{
"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
statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}statusCodeinteger (int32)requiredHTTP status code for this error
errorCodestringrequiredAn APG Pay code providing a brief explanation of the underlying error. Use this if you wish to provide custom behaviour based on the error type.
messagestringrequiredHuman readable description of the error
tracerstringAn unique identifier for the request. Provide this to the support team if you wish to query a particular error.
detailstringOptional additional details for the error.
errorTypeDescriptionstringA description of the category of errors for the given statusCode.
metadataobjectOptional key value list of metadata
{
"statusCode": 100,
"errorCode": "string",
"message": "string",
"tracer": "string",
"detail": "string",
"errorTypeDescription": "string"
}