Webstore
Install marketplace template
Installs a template from the marketplace into the store's webstore and returns the ID of the installed copy.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/marketplace/templates/{marketplaceTemplateId}/install" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.installMarketplaceTemplate("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/marketplace/templates/{marketplaceTemplateId}/install", headers=headers){
"installed_template_id": "411486491630370816"
}Get webstore modules
Retrieves all modules on the store's webstore, in sort order.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/modules" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreModules();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/modules", headers=headers)[
{
"id": "411486491630370816",
"created_at": "2024-01-01T00:00:00Z",
"enabled": true,
"sort_order": 0,
"type": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"ends_at": "2024-01-01T00:00:00Z",
"settings": {},
"starts_at": "2024-01-01T00:00:00Z"
}
]Create webstore module
Adds a module to the store's webstore. The module's 'type' decides which 'settings' it accepts.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/modules" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"type": "string",
"ends_at": "2024-01-01T00:00:00Z",
"settings": {},
"starts_at": "2024-01-01T00:00:00Z"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.createWebstoreModule({
enabled: true,
type: "string",
ends_at: "2024-01-01T00:00:00Z",
settings: {},
starts_at: "2024-01-01T00:00:00Z",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"enabled": True,
"type": "string",
"ends_at": "2024-01-01T00:00:00Z",
"settings": {},
"starts_at": "2024-01-01T00:00:00Z",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/modules", headers=headers, json=payload){
"id": "411486491630370816",
"created_at": "2024-01-01T00:00:00Z",
"enabled": true,
"sort_order": 0,
"type": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"ends_at": "2024-01-01T00:00:00Z",
"settings": {},
"starts_at": "2024-01-01T00:00:00Z"
}Update webstore module
Performs a delta update of a module on the store's webstore.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/modules/{moduleId}" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"enabled": true,
"type": "string",
"ends_at": "2024-01-01T00:00:00Z",
"settings": {},
"starts_at": "2024-01-01T00:00:00Z"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.updateWebstoreModule("411486491630370816", {
enabled: true,
type: "string",
ends_at: "2024-01-01T00:00:00Z",
settings: {},
starts_at: "2024-01-01T00:00:00Z",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"enabled": True,
"type": "string",
"ends_at": "2024-01-01T00:00:00Z",
"settings": {},
"starts_at": "2024-01-01T00:00:00Z",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/modules/{moduleId}", headers=headers, json=payload){
"id": "411486491630370816",
"created_at": "2024-01-01T00:00:00Z",
"enabled": true,
"sort_order": 0,
"type": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"ends_at": "2024-01-01T00:00:00Z",
"settings": {},
"starts_at": "2024-01-01T00:00:00Z"
}Delete webstore module
Permanently removes a module from the store's webstore.
Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/webstore/modules/{moduleId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.deleteWebstoreModule("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/webstore/modules/{moduleId}", headers=headers)Get webstore
Retrieves the store's webstore, covering the slug it is served from, its custom domain state and the template it currently renders.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstore();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore", headers=headers){
"id": "411486491630370816",
"custom_domain_verified": true,
"is_active": true,
"slug": "string",
"current_template_id": "411486491630370816",
"custom_domain": "string"
}Set default template
Sets the template the webstore renders for customers.
Authorization: APIKey TOKEN.curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/set-default-template" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"template_id": "411486491630370816"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.setWebstoreDefaultTemplate({
template_id: "411486491630370816",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"template_id": "411486491630370816",
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/set-default-template", headers=headers, json=payload)Set webstore slug
Changes the slug the webstore is reachable at. Slugs are unique across all webstores, so a slug already taken by another store is rejected.
Authorization: APIKey TOKEN.curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/set-slug" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"slug": "string"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.setWebstoreSlug({
slug: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"slug": "string",
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/set-slug", headers=headers, json=payload)Get custom domain
Retrieves the custom domain attached to the store's webstore, along with the records still outstanding for ownership and SSL verification.
Authorization: APIKey TOKEN.Show fieldsHide fields
ownership_verificationWebstoreCustomDomainOwnershipVerificationDtoOptionalRepresents the DNS record that has to be published to prove ownership of a webstore's custom domain.
ownership_verification_httpWebstoreCustomDomainOwnershipVerificationHttpDtoOptionalRepresents the token file that has to be served over HTTP to prove ownership of a webstore's
custom domain.
sslWebstoreCustomDomainSslDtoOptionalRepresents the SSL certificate issued for a webstore's custom domain.
validation_recordsWebstoreCustomDomainSslValidationRecordDto[]RequiredThe records that have to be published to validate the certificate. Empty once validation no
longer needs them.
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreCustomDomain();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain", headers=headers){
"id": "string",
"hostname": "string",
"status": "string",
"verification_errors": [
"string"
],
"created_at": "2024-01-01T00:00:00Z",
"ownership_verification": {
"name": "string",
"type": "string",
"value": "string"
},
"ownership_verification_http": {
"http_body": "string",
"http_url": "string"
},
"ssl": {
"id": "string",
"method": "string",
"status": "string",
"validation_errors": [
"string"
],
"validation_records": [
{
"emails": [
"string"
],
"http_body": "string",
"http_url": "string",
"txt_name": "string",
"txt_value": "string"
}
],
"certificate_authority": "string"
}
}Set custom domain
Attaches a custom domain to the store's webstore and begins verification.
Authorization: APIKey TOKEN.invalidNo verification type specified. This value is typically used as a default or uninitialized state.
httpOwnership is proven by serving a token file over HTTP from the domain. This is the RECOMMENDED way to prove ownership, and is used by the dashboard.
txtOwnership is proven by publishing a DNS TXT record on the domain.
emailOwnership is proven by following a link sent to an administrative address on the domain.
cnameOwnership is proven by publishing a DNS CNAME record on the domain.
Show fieldsHide fields
ownership_verificationWebstoreCustomDomainOwnershipVerificationDtoOptionalRepresents the DNS record that has to be published to prove ownership of a webstore's custom domain.
ownership_verification_httpWebstoreCustomDomainOwnershipVerificationHttpDtoOptionalRepresents the token file that has to be served over HTTP to prove ownership of a webstore's
custom domain.
sslWebstoreCustomDomainSslDtoOptionalRepresents the SSL certificate issued for a webstore's custom domain.
validation_recordsWebstoreCustomDomainSslValidationRecordDto[]RequiredThe records that have to be published to validate the certificate. Empty once validation no
longer needs them.
Failed requests return a PayNowError body. See the error response guide.
curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"domain": "string",
"verification_type": "invalid"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.setWebstoreCustomDomain({
domain: "string",
verification_type: "invalid",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"domain": "string",
"verification_type": "invalid",
}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain", headers=headers, json=payload){
"id": "string",
"hostname": "string",
"status": "string",
"verification_errors": [
"string"
],
"created_at": "2024-01-01T00:00:00Z",
"ownership_verification": {
"name": "string",
"type": "string",
"value": "string"
},
"ownership_verification_http": {
"http_body": "string",
"http_url": "string"
},
"ssl": {
"id": "string",
"method": "string",
"status": "string",
"validation_errors": [
"string"
],
"validation_records": [
{
"emails": [
"string"
],
"http_body": "string",
"http_url": "string",
"txt_name": "string",
"txt_value": "string"
}
],
"certificate_authority": "string"
}
}Delete custom domain
Detaches the custom domain from the store's webstore. The webstore stays reachable at its slug.
Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.deleteWebstoreCustomDomain();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain", headers=headers)Verify custom domain
Re-checks the verification records for the webstore's custom domain. Call this once the records returned when the domain was set have been published.
Authorization: APIKey TOKEN.curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain/verify" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.verifyWebstoreCustomDomain();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/custom-domain/verify", headers=headers)Get template files
Retrieves the files of a template without their content. Fetch a single file to read its content.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplateFiles("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files", headers=headers)[
{
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}
]Create template file
Adds a file to a template. Its 'file_name' and 'content_type' decide where the file is served from and whether it is public.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content_type": "string",
"file_name": "string",
"content": "string"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.createWebstoreTemplateFile("411486491630370816", {
content_type: "string",
file_name: "string",
content: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"content_type": "string",
"file_name": "string",
"content": "string",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files", headers=headers, json=payload){
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}Get template file
Retrieves a single template file, content included.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplateFile("411486491630370816", "411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}", headers=headers){
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}Update template file content
Replaces the content of a template file. If the template is the webstore's current template, customers see the change immediately.
Authorization: APIKey TOKEN.curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"content": "string"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.updateWebstoreTemplateFile("411486491630370816", "411486491630370816", {
content: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"content": "string",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}", headers=headers, json=payload)Delete template file
Permanently deletes a template file. Files whose 'is_deletable' is false cannot be removed.
Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.deleteWebstoreTemplateFile("411486491630370816", "411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/files/{templateFileId}", headers=headers)Get templates
Retrieves the templates of the store's webstore, without their files. The one customers see is the webstore's 'current_template_id'.
Authorization: APIKey TOKEN.Show fieldsHide fields
invalidNo compatibility mode specified. This value is typically used as a default or uninitialized state.
paynowA native PayNow template.
tebexA template written for Tebex, rendered through a compatibility layer so it works without changes.
template_filesWebstoreTemplateFileDto[]OptionalThe template's files, content included. Only returned when a single template is fetched with
'include' set to 'files'; null otherwise.
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplates();import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates", headers=headers)[
{
"id": "411486491630370816",
"compatibility_mode": "invalid",
"created_at": "2024-01-01T00:00:00Z",
"is_public": true,
"name": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"template_files": [
{
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}
]
}
]Create template
Creates an empty template on the store's webstore. Add files to it, then set it as the webstore's default template to serve it to customers.
Authorization: APIKey TOKEN.invalidNo compatibility mode specified. This value is typically used as a default or uninitialized state.
paynowA native PayNow template.
tebexA template written for Tebex, rendered through a compatibility layer so it works without changes.
Show fieldsHide fields
invalidNo compatibility mode specified. This value is typically used as a default or uninitialized state.
paynowA native PayNow template.
tebexA template written for Tebex, rendered through a compatibility layer so it works without changes.
template_filesWebstoreTemplateFileDto[]OptionalThe template's files, content included. Only returned when a single template is fetched with
'include' set to 'files'; null otherwise.
Failed requests return a PayNowError body. See the error response guide.
curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"compatibility_mode": "invalid",
"name": "string"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.createWebstoreTemplate({
compatibility_mode: "invalid",
name: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"compatibility_mode": "invalid",
"name": "string",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates", headers=headers, json=payload){
"id": "411486491630370816",
"compatibility_mode": "invalid",
"created_at": "2024-01-01T00:00:00Z",
"is_public": true,
"name": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"template_files": [
{
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}
]
}Get template
Retrieves a template. Pass 'include' as 'files' to embed its files, content included, in 'template_files'.
Authorization: APIKey TOKEN.Show fieldsHide fields
invalidNo compatibility mode specified. This value is typically used as a default or uninitialized state.
paynowA native PayNow template.
tebexA template written for Tebex, rendered through a compatibility layer so it works without changes.
template_filesWebstoreTemplateFileDto[]OptionalThe template's files, content included. Only returned when a single template is fetched with
'include' set to 'files'; null otherwise.
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplate("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}", headers=headers){
"id": "411486491630370816",
"compatibility_mode": "invalid",
"created_at": "2024-01-01T00:00:00Z",
"is_public": true,
"name": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"template_files": [
{
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}
]
}Update template
Performs a delta update of a template's name and compatibility mode.
Authorization: APIKey TOKEN.invalidNo compatibility mode specified. This value is typically used as a default or uninitialized state.
paynowA native PayNow template.
tebexA template written for Tebex, rendered through a compatibility layer so it works without changes.
Show fieldsHide fields
invalidNo compatibility mode specified. This value is typically used as a default or uninitialized state.
paynowA native PayNow template.
tebexA template written for Tebex, rendered through a compatibility layer so it works without changes.
template_filesWebstoreTemplateFileDto[]OptionalThe template's files, content included. Only returned when a single template is fetched with
'include' set to 'files'; null otherwise.
Failed requests return a PayNowError body. See the error response guide.
curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"compatibility_mode": "invalid",
"name": "string"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.updateWebstoreTemplate("411486491630370816", {
compatibility_mode: "invalid",
name: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"compatibility_mode": "invalid",
"name": "string",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}", headers=headers, json=payload){
"id": "411486491630370816",
"compatibility_mode": "invalid",
"created_at": "2024-01-01T00:00:00Z",
"is_public": true,
"name": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"template_files": [
{
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}
]
}Delete template
Permanently deletes a template and all of its files. Switch the webstore to another template first if this one is its current template.
Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.deleteWebstoreTemplate("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}", headers=headers)Get latest template version
Retrieves the newest published version available for a template installed from the marketplace. 'version' is null when there is no update or the template is not marketplace-based.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/update" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplateLatestVersion("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/update", headers=headers){
"version": "string"
}Update template to latest version
Downloads the newest published version of a marketplace template over the installed copy, replacing its files.
Authorization: APIKey TOKEN.curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/update" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.downloadWebstoreTemplateUpdate("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/update", headers=headers)Get template schema
Retrieves the schema a template declares: its author, support contacts, update source and the settings a store can configure.
Authorization: APIKey TOKEN.Show fieldsHide fields
configWebstoreTemplateSchemaSectionDto[]RequiredThe sections of settings the template exposes, in display order.
optionsWebstoreTemplateSchemaOptionDto[]RequiredThe settings in the section, in display order.
updatesWebstoreTemplateSchemaUpdatesDtoOptionalRepresents how a template receives updates from its author.
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/schema" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplateSchema("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/schema", headers=headers){
"author": "string",
"config": [
{
"header": "string",
"options": [
{
"id": "string",
"name": "string",
"nested_options": [
{}
],
"type": "string",
"values": [
"string"
],
"default": {},
"description": "string",
"max": 0,
"min": 0,
"multiline": true,
"numeric": true
}
]
}
],
"support_email": "string",
"support_url": "string",
"updates": {
"github_branch": "string",
"supported": true,
"version_check_supported": true,
"github_token": "string",
"github_url": "string",
"version": "string"
}
}Update template schema variables
Sets values for the settings the template's schema defines.
Authorization: APIKey TOKEN.curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/schema/variables" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.updateWebstoreTemplateSchemaVariables("411486491630370816", {});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/schema/variables", headers=headers, json=payload)Duplicate template
Copies a template and its files into a new template on the same webstore and returns it.
Authorization: APIKey TOKEN.Show fieldsHide fields
invalidNo compatibility mode specified. This value is typically used as a default or uninitialized state.
paynowA native PayNow template.
tebexA template written for Tebex, rendered through a compatibility layer so it works without changes.
template_filesWebstoreTemplateFileDto[]OptionalThe template's files, content included. Only returned when a single template is fetched with
'include' set to 'files'; null otherwise.
Failed requests return a PayNowError body. See the error response guide.
curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/duplicate" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.duplicateWebstoreTemplate("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/duplicate", headers=headers){
"id": "411486491630370816",
"compatibility_mode": "invalid",
"created_at": "2024-01-01T00:00:00Z",
"is_public": true,
"name": "string",
"updated_at": "2024-01-01T00:00:00Z",
"webstore_id": "411486491630370816",
"template_files": [
{
"id": "411486491630370816",
"content_type": "string",
"created_at": "2024-01-01T00:00:00Z",
"file_name": "string",
"is_deletable": true,
"is_public": true,
"template_id": "411486491630370816",
"updated_at": "2024-01-01T00:00:00Z",
"content": "string"
}
]
}Get template archive
Creates a temporary URL to download the template's files as an archive.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/archive" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplateArchive("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/archive", headers=headers){
"download_url": "string"
}Get template upload URL
Creates a pre-signed URL for uploading an archive of template files. Upload the archive to it, then finish the upload to import the files into the template.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/upload_url" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplateUploadUrl("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/upload_url", headers=headers){
"upload_url": "string"
}Finish template upload
Imports the files from an archive uploaded to the URL returned by the upload URL endpoint into the template, and reports any files that could not be imported.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/upload_finish" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.finishWebstoreTemplateUpload("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/upload_finish", headers=headers){
"failed_files": [
"string"
]
}Create template preview URL
Creates a short-lived link that renders the template without caching. The link expires after 15 minutes.
Authorization: APIKey TOKEN.Show fieldsHide fields
Failed requests return a PayNowError body. See the error response guide.
curl -X POST "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/preview" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplatePreviewUrl("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.post("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/preview", headers=headers){
"expires_at": "2024-01-01T00:00:00Z",
"slug": "string",
"url": "string"
}Get template variables
Retrieves the variables of a template with their current values.
Authorization: APIKey TOKEN.Show fieldsHide fields
invalidNo type specified. This value is typically used as a default or uninitialized state.
stringThe value is used as plain text.
htmlThe value is inserted as raw HTML without escaping.
numberThe value is parsed as a number.
booleanThe value is parsed as a boolean; 'true' is true, anything else is false.
jsonThe value is parsed as a JSON document.
Failed requests return a PayNowError body. See the error response guide.
curl -X GET "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.getWebstoreTemplateVariables("411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.get("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables", headers=headers)[
{
"id": "411486491630370816",
"created_at": "2024-01-01T00:00:00Z",
"name": "string",
"template_id": "411486491630370816",
"type": "invalid",
"updated_at": "2024-01-01T00:00:00Z",
"value": "string",
"variable": "string",
"webstore_id": "411486491630370816"
}
]Create template variable
Adds a variable to a template. Its 'variable' is the name the template's files reference it by, and 'type' decides how 'value' is parsed when the template renders.
Authorization: APIKey TOKEN.invalidNo type specified. This value is typically used as a default or uninitialized state.
stringThe value is used as plain text.
htmlThe value is inserted as raw HTML without escaping.
numberThe value is parsed as a number.
booleanThe value is parsed as a boolean; 'true' is true, anything else is false.
jsonThe value is parsed as a JSON document.
Show fieldsHide fields
invalidNo type specified. This value is typically used as a default or uninitialized state.
stringThe value is used as plain text.
htmlThe value is inserted as raw HTML without escaping.
numberThe value is parsed as a number.
booleanThe value is parsed as a boolean; 'true' is true, anything else is false.
jsonThe value is parsed as a JSON document.
Failed requests return a PayNowError body. See the error response guide.
curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"type": "invalid",
"value": "string",
"variable": "string"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.createWebstoreTemplateVariable("411486491630370816", {
name: "string",
type: "invalid",
value: "string",
variable: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"name": "string",
"type": "invalid",
"value": "string",
"variable": "string",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables", headers=headers, json=payload){
"id": "411486491630370816",
"created_at": "2024-01-01T00:00:00Z",
"name": "string",
"template_id": "411486491630370816",
"type": "invalid",
"updated_at": "2024-01-01T00:00:00Z",
"value": "string",
"variable": "string",
"webstore_id": "411486491630370816"
}Update template variable
Performs a delta update of a template variable.
Authorization: APIKey TOKEN.invalidNo type specified. This value is typically used as a default or uninitialized state.
stringThe value is used as plain text.
htmlThe value is inserted as raw HTML without escaping.
numberThe value is parsed as a number.
booleanThe value is parsed as a boolean; 'true' is true, anything else is false.
jsonThe value is parsed as a JSON document.
Show fieldsHide fields
invalidNo type specified. This value is typically used as a default or uninitialized state.
stringThe value is used as plain text.
htmlThe value is inserted as raw HTML without escaping.
numberThe value is parsed as a number.
booleanThe value is parsed as a boolean; 'true' is true, anything else is false.
jsonThe value is parsed as a JSON document.
Failed requests return a PayNowError body. See the error response guide.
curl -X PUT "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables/{templateVariableId}" \
-H "Authorization: APIKey TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "string",
"type": "invalid",
"value": "string",
"variable": "string"
}'import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
const result = await paynow.webstore.updateWebstoreTemplateVariable("411486491630370816", "411486491630370816", {
name: "string",
type: "invalid",
value: "string",
variable: "string",
});import requests
headers = {"Authorization": "APIKey TOKEN"}
payload = {
"name": "string",
"type": "invalid",
"value": "string",
"variable": "string",
}
response = requests.put("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables/{templateVariableId}", headers=headers, json=payload){
"id": "411486491630370816",
"created_at": "2024-01-01T00:00:00Z",
"name": "string",
"template_id": "411486491630370816",
"type": "invalid",
"updated_at": "2024-01-01T00:00:00Z",
"value": "string",
"variable": "string",
"webstore_id": "411486491630370816"
}Delete template variable
Permanently deletes a template variable.
Authorization: APIKey TOKEN.curl -X DELETE "https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables/{templateVariableId}" \
-H "Authorization: APIKey TOKEN"import { createManagementClient } from "@paynow-gg/typescript-sdk";
const paynow = createManagementClient({
apiKey: "API_KEY",
storeId: "STORE_ID",
});
await paynow.webstore.deleteWebstoreTemplateVariable("411486491630370816", "411486491630370816");import requests
headers = {"Authorization": "APIKey TOKEN"}
response = requests.delete("https://api.paynow.gg/v1/stores/{storeId}/webstore/templates/{templateId}/variables/{templateVariableId}", headers=headers)