DEVELOPERS

API reference

Every SMetaGateway REST endpoint, generated from the OpenAPI 3.1 contract. Use bearer API keys from your server; amounts are decimal strings.

Base URL
https://smg.sabco24.com/api/v1
Version
0.2.0 · OpenAPI 3.1

Endpoints

All operations grouped by resource.

MethodPathDescriptionAuth
System
GET/healthCheck service health and gateway mode.Public
GET/configRead public client configuration, including the captcha site key.Public
Authentication
POST/auth/registerRegister a merchant and start an owner session.Public
POST/auth/loginSign in and start an owner session.Public
POST/auth/logoutEnd the current owner session.Public
Account
GET/meGet the merchant account, wallets, invoices, keys, webhooks and statistics.Owner session
PATCH/meUpdate the merchant display name.Owner session
Wallets
GET/walletsList registered receiving addresses.API key or session
POST/walletsRegister a checksummed TRON receiving address (ownership unverified).Owner session
Invoices
GET/invoicesList the latest 500 invoices.API key or session
POST/invoicesCreate an invoice and reserve a unique exact payable amount for 90 days.API key or session
GET/invoices/{id}Retrieve one invoice belonging to this merchant.API key or session
Checkout
GET/checkout/{token}Read payer-safe checkout details by checkout token.Public
API keys
POST/api-keysCreate an API key with an optional expiry; the secret is shown once.Owner session
POST/api-keys/{id}/rollReplace an API key with a new secret of the same name and lifetime.Owner session
DELETE/api-keys/{id}Revoke an API key immediately.Owner session
Ledger
GET/ledger.csvExport the full operational ledger as CSV.API key or session
Webhooks
POST/webhooksRegister a public HTTPS webhook endpoint; the signing secret is shown once.Owner session
DELETE/webhooks/{id}Disable an endpoint and cancel its pending deliveries.Owner session
POST/webhooks/{id}/testSend a signed webhook.test event.Owner session
POST/webhooks/deliveries/{id}/retryRetry a failed or pending webhook delivery.Owner session
Support
POST/support/contactSend a message to support without an account.Public
GET/support/ticketsList your support tickets.Owner session
POST/support/ticketsOpen a support ticket.Owner session
GET/support/tickets/{id}Read one of your tickets with its messages.Owner session
POST/support/tickets/{id}/messagesReply to your ticket; a closed ticket reopens.Owner session
POST/support/tickets/{id}/closeClose your ticket.Owner session
GET/support/inboxSupport team: list every ticket, open tickets first.Owner session
GET/support/inbox/{id}Support team: read a ticket with contact details.Owner session
POST/support/inbox/{id}/messagesSupport team: reply to a merchant ticket.Owner session
POST/support/inbox/{id}/statusSupport team: set a ticket status.Owner session

System

GET/api/v1/health

Public

Check service health and gateway mode.

Returns: 200 application/json
FieldTypeRequiredDescription
status"ok"No
mode"live"NoInvoices are confirmed from verified TRON mainnet transfers.
live_payments_enabledtrueNo

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/health"

GET/api/v1/config

Public

Read public client configuration, including the captcha site key.

captcha is null when Cloudflare Turnstile is not configured; otherwise send captcha_token with sign-in, registration and contact requests.

Returns: 200 application/json
FieldTypeRequiredDescription
captchaobjectYes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/config"

Authentication

POST/api/v1/auth/register

Public

Register a merchant and start an owner session.

Request body

FieldTypeRequiredDescription
emailstring (email)Yes
passwordstring (password)Yeslength 12–128
captcha_tokenstringNoCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
namestringNolength 0–100
Returns: 201 application/json
FieldTypeRequiredDescription
merchantMerchantNo

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
  • 503Captcha verification is temporarily unavailable
Example request
curl -X POST "https://smg.sabco24.com/api/v1/auth/register" \
  -H "Content-Type: application/json" \
  -d '{"name":"Example Store","email":"merchant@example.com","password":"a-long-unique-passphrase"}'

POST/api/v1/auth/login

Public

Sign in and start an owner session.

Request body

FieldTypeRequiredDescription
emailstring (email)Yes
passwordstring (password)Yeslength 10–128
captcha_tokenstringNoCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
Returns: 200 application/json
FieldTypeRequiredDescription
merchantMerchantNo

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
  • 503Captcha verification is temporarily unavailable
Example request
curl -X POST "https://smg.sabco24.com/api/v1/auth/login" \
  -H "Content-Type: application/json" \
  -d '{"email":"merchant@example.com","password":"a-long-unique-passphrase"}'

POST/api/v1/auth/logout

Public

End the current owner session.

Returns: 200 application/json
FieldTypeRequiredDescription
successtrueYes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/auth/logout" \
  -H "Content-Type: application/json" \
  -d '{}'

Account

GET/api/v1/me

Owner session

Get the merchant account, wallets, invoices, keys, webhooks and statistics.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Returns: 200 Dashboard
FieldTypeRequiredDescription
merchantMerchantYes
walletsWallet[]Yes
invoicesInvoice[]Yes
eventsEvent[]Yes
api_keysApiKey[]Yes
webhooksWebhook[]Yes
deliveriesDelivery[]Yes
statsobjectYes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/me" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

PATCH/api/v1/me

Owner session

Update the merchant display name.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Request body

FieldTypeRequiredDescription
namestringYeslength 1–100
Returns: 200 Dashboard
FieldTypeRequiredDescription
merchantMerchantYes
walletsWallet[]Yes
invoicesInvoice[]Yes
eventsEvent[]Yes
api_keysApiKey[]Yes
webhooksWebhook[]Yes
deliveriesDelivery[]Yes
statsobjectYes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X PATCH "https://smg.sabco24.com/api/v1/me" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'

Wallets

GET/api/v1/wallets

API key or session

List registered receiving addresses.

Returns: 200 application/json
FieldTypeRequiredDescription
walletsWallet[]No

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/wallets" \
  -H "Authorization: Bearer $SMETA_API_KEY"

POST/api/v1/wallets

Owner session

Register a checksummed TRON receiving address (ownership unverified).

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Request body

FieldTypeRequiredDescription
labelstringYeslength 1–80
addressstringYespattern ^T[1-9A-HJ-NP-Za-km-z]{33}$
Returns: 200 application/json
FieldTypeRequiredDescription
walletWalletNo

Responses

  • 200Existing address
  • 201Registered
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/wallets" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"label":"Main business wallet","address":"T_YOUR_PUBLIC_TRON_ADDRESS"}'

Invoices

GET/api/v1/invoices

API key or session

List the latest 500 invoices.

Returns: 200 application/json
FieldTypeRequiredDescription
invoicesInvoice[]No

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/invoices" \
  -H "Authorization: Bearer $SMETA_API_KEY"

POST/api/v1/invoices

API key or session

Create an invoice and reserve a unique exact payable amount for 90 days.

Amount allocation is global for (network, token contract, receiving address, final payable micro-units), including merchants sharing an address. Reservations outlive invoice expiry. Historical amount reuse is assigned review status. The invoice is confirmed only when a verified TRON transfer of exactly payable_amount reaches wallet_address between creation and expiry.

Required headers

FieldTypeRequiredDescription
Idempotency-KeystringYesUnique key per invoice attempt; reuse it when retrying.

Request body CreateInvoice

FieldTypeRequiredDescription
merchant_order_idstringYesUnique per merchant. Reuse the original idempotency key for retries. — length 1–120
amountstringYesBase price in USDT; minimum 0.000001, maximum 1000000000. The server adds a disclosed identification adjustment. — pattern ^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$ · e.g. "49.95"
wallet_idstringYesID of a wallet registered to this merchant. — length 1–100
descriptionstringNolength 1–1000
metadataobjectNoJSON object, at most 16 KiB when serialized. Keep customer secrets out of metadata.
expires_in_minutesintegerNorange 1–1440 · default 20
Returns: 200 InvoiceEnvelope
FieldTypeRequiredDescription
invoiceInvoiceYes
idempotent_replaybooleanNo

Responses

  • 200Identical idempotent replay
  • 201Invoice allocated
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/invoices" \
  -H "Authorization: Bearer $SMETA_API_KEY" \
  -H "Idempotency-Key: order-1001" \
  -H "Content-Type: application/json" \
  -d '{"merchant_order_id":"1001","amount":"49.95","wallet_id":"WALLET_ID","description":"Example order","expires_in_minutes":20}'

GET/api/v1/invoices/{id}

API key or session

Retrieve one invoice belonging to this merchant.

Path parameters

FieldTypeRequiredDescription
idstringYesInvoice ID
Returns: 200 application/json
FieldTypeRequiredDescription
invoiceInvoiceNo

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/invoices/ID" \
  -H "Authorization: Bearer $SMETA_API_KEY"

Checkout

GET/api/v1/checkout/{token}

Public

Read payer-safe checkout details by checkout token.

Path parameters

FieldTypeRequiredDescription
tokenstringYesCheckout capability token from checkout_url
Returns: 200 application/json
FieldTypeRequiredDescription
invoiceCheckoutInvoiceNo

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/checkout/TOKEN"

API keys

POST/api/v1/api-keys

Owner session

Create an API key with an optional expiry; the secret is shown once.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Request body

FieldTypeRequiredDescription
namestringYeslength 1–80
expires_in_daysinteger | nullNoDays until the key expires. Omit or send null for a key that never expires. — range 1–3650 · e.g. 90
Returns: 201 application/json
FieldTypeRequiredDescription
api_keyApiKey & objectNo
secretstringNo
warningstringNo

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/api-keys" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"name":"string"}'

POST/api/v1/api-keys/{id}/roll

Owner session

Replace an API key with a new secret of the same name and lifetime.

The old key is revoked in the same transaction. The new secret is shown once.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesAPI key ID
Returns: 201 application/json
FieldTypeRequiredDescription
api_keyApiKey & objectNo
secretstringNo
warningstringNo
replaced_key_idstringNo

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/api-keys/ID/roll" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{}'

DELETE/api/v1/api-keys/{id}

Owner session

Revoke an API key immediately.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesAPI key ID
Returns: 200 application/json
FieldTypeRequiredDescription
successtrueYes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X DELETE "https://smg.sabco24.com/api/v1/api-keys/ID" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

Ledger

GET/api/v1/ledger.csv

API key or session

Export the full operational ledger as CSV.

Returns: 200 text/csv

Responses

  • 200CSV includes separate base, adjustment and payable columns; not a statutory accounting report.
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/ledger.csv" \
  -H "Authorization: Bearer $SMETA_API_KEY"

Webhooks

POST/api/v1/webhooks

Owner session

Register a public HTTPS webhook endpoint; the signing secret is shown once.

Port 443 only. Local/private targets, IP literals, credentials, URL fragments and redirects are rejected. DNS is resolved and checked again at delivery time.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Request body

FieldTypeRequiredDescription
urlstring (uri)Yeslength 0–2048
Returns: 201 application/json
FieldTypeRequiredDescription
webhookWebhook & objectNo
secretstringNo

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/webhooks" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"url":"https://merchant.example.com/hooks/smeta"}'

DELETE/api/v1/webhooks/{id}

Owner session

Disable an endpoint and cancel its pending deliveries.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesWebhook ID
Returns: 200 application/json
FieldTypeRequiredDescription
successtrueYes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X DELETE "https://smg.sabco24.com/api/v1/webhooks/ID" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

POST/api/v1/webhooks/{id}/test

Owner session

Send a signed webhook.test event.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesWebhook ID
Returns: 200 application/json
FieldTypeRequiredDescription
eventEventNo
deliveriesDelivery[]No

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/webhooks/ID/test" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{}'

POST/api/v1/webhooks/deliveries/{id}/retry

Owner session

Retry a failed or pending webhook delivery.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesDelivery ID
Returns: 200 application/json
FieldTypeRequiredDescription
deliveryDeliveryNo

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/webhooks/deliveries/ID/retry" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{}'

POSThttps://your-server.example/hooks/smeta

Receive a signed gateway event at your configured URL

Verify HMAC-SHA256(secret, timestamp + "." + original raw body). The signature header is sha256=<lowercase hex>. Reject timestamps outside your five-minute window and deduplicate event IDs. Each retry is freshly signed. GET the saved invoice with your server key and reconcile it before fulfilling once. invoice.confirmed includes the matched on-chain transaction.

Required headers

X-SMeta-Event-IdX-SMeta-TimestampX-SMeta-Signature

Responses

  • 200Persisted successfully or already processed. Any 2xx acknowledges delivery.
  • 400Invalid event
  • 401Invalid or stale signature
  • 503Temporary failure; retry delivery

Support

POST/api/v1/support/contact

Public

Send a message to support without an account.

Creates a ticket that the support team answers by email. Only the reference is returned.

Request body

FieldTypeRequiredDescription
namestringYeslength 1–100
emailstring (email)Yeslength 0–254
subjectstringYeslength 1–150
category"general" | "payments" | "technical" | "account" | "other"Nodefault "general"
messagestringYeslength 1–5000
captcha_tokenstringNoCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
Returns: 201 application/json
FieldTypeRequiredDescription
ticketobjectNo

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
  • 503Captcha verification is temporarily unavailable
Example request
curl -X POST "https://smg.sabco24.com/api/v1/support/contact" \
  -H "Content-Type: application/json" \
  -d '{"name":"Jane Doe","email":"jane@example.com","subject":"Question about pricing","category":"general","message":"Do you charge per invoice?","captcha_token":"TURNSTILE_RESPONSE_TOKEN"}'

GET/api/v1/support/tickets

Owner session

List your support tickets.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Returns: 200 application/json
FieldTypeRequiredDescription
ticketsSupportTicket[]No

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/support/tickets" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

POST/api/v1/support/tickets

Owner session

Open a support ticket.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Request body

FieldTypeRequiredDescription
subjectstringYeslength 1–150
category"general" | "payments" | "technical" | "account" | "other"Nodefault "general"
messagestringYeslength 1–5000
Returns: 201 SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/support/tickets" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"subject":"Webhook signature fails","category":"technical","message":"Deliveries return 401 since yesterday."}'

GET/api/v1/support/tickets/{id}

Owner session

Read one of your tickets with its messages.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesTicket ID
Returns: 200 SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/support/tickets/ID" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

POST/api/v1/support/tickets/{id}/messages

Owner session

Reply to your ticket; a closed ticket reopens.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesTicket ID

Request body

FieldTypeRequiredDescription
messagestringYeslength 1–5000
Returns: 201 SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/support/tickets/ID/messages" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"message":"string"}'

POST/api/v1/support/tickets/{id}/close

Owner session

Close your ticket.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesTicket ID
Returns: 200 SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/support/tickets/ID/close" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{}'

GET/api/v1/support/inbox

Owner session

Support team: list every ticket, open tickets first.

Requires a session for an account listed in SUPPORT_STAFF_EMAILS.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Returns: 200 application/json
FieldTypeRequiredDescription
ticketsSupportTicket[]No

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/support/inbox" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

GET/api/v1/support/inbox/{id}

Owner session

Support team: read a ticket with contact details.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesTicket ID
Returns: 200 SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X GET "https://smg.sabco24.com/api/v1/support/inbox/ID" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

POST/api/v1/support/inbox/{id}/messages

Owner session

Support team: reply to a merchant ticket.

Contact-form tickets return 409 email_reply_required because the visitor has no account.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesTicket ID

Request body

FieldTypeRequiredDescription
messagestringYeslength 1–5000
Returns: 201 SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes

Responses

  • 201Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/support/inbox/ID/messages" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"message":"string"}'

POST/api/v1/support/inbox/{id}/status

Owner session

Support team: set a ticket status.

Requires the dashboard owner session cookie; API keys are rejected for this operation.

Path parameters

FieldTypeRequiredDescription
idstringYesTicket ID

Request body

FieldTypeRequiredDescription
status"open" | "answered" | "closed"Yes
Returns: 200 SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes

Responses

  • 200Success
  • 400Validation error
  • 401Authentication required
  • 403Insufficient scope or invalid origin
  • 404Resource not found
  • 409Conflict, exhausted amount pool or manual review required
  • 429Rate limit exceeded
  • 500Internal server error
Example request
curl -X POST "https://smg.sabco24.com/api/v1/support/inbox/ID/status" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com" \
  -H "Content-Type: application/json" \
  -d '{"status":"open"}'

Schemas

Objects returned and accepted by the API.

Error
FieldTypeRequiredDescription
errorobjectYes
mode"live"YesInvoices are confirmed from verified TRON mainnet transfers.
Merchant
FieldTypeRequiredDescription
idstringYes
namestringYes
emailstring (email)Yes
mode"live"YesInvoices are confirmed from verified TRON mainnet transfers.
support_staffbooleanNoTrue when this account is listed in SUPPORT_STAFF_EMAILS and may use the support inbox.
SupportTicket
FieldTypeRequiredDescription
idstringYes
referencestringYesHuman-friendly reference such as SMG-1A2B3C4D5E.
subjectstringYes
category"general" | "payments" | "technical" | "account" | "other"Yesdefault "general"
status"open" | "answered" | "closed"Yesopen: waiting for support; answered: support replied; closed: resolved.
source"dashboard" | "contact"Yes
created_atstring (date-time)Yes
updated_atstring (date-time)Yes
namestringNoSupport inbox only.
emailstring (email)NoSupport inbox only.
merchant_idstring | nullNoSupport inbox only. Null for public contact messages.
merchant_namestring | nullNoSupport inbox only.
SupportMessage
FieldTypeRequiredDescription
idstringYes
author"customer" | "staff"Yes
bodystringYes
created_atstring (date-time)Yes
SupportThread
FieldTypeRequiredDescription
ticketSupportTicketYes
messagesSupportMessage[]Yes
Wallet
FieldTypeRequiredDescription
idstringYes
labelstringYes
addressstringYes
network"tron-mainnet"Yes
verifiedfalseYes
verification_status"unverified"Yes
created_atstring (date-time)Yes
CheckoutInvoice
FieldTypeRequiredDescription
idstringYes
base_amountstringYesExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
adjustmentstringYesExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
payable_amountstringYesExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
wallet_addressstringYes
status"pending" | "confirmed" | "expired" | "review"Yes
created_atstring (date-time)No
expires_atstring (date-time)No
reserved_untilstring (date-time)No
descriptionstringNo
tx_hashstring | nullNoTRON transaction hash of the matched USDT transfer (64 hex characters).
mode"live"YesInvoices are confirmed from verified TRON mainnet transfers.
network"tron-mainnet"No
token"USDT"No
token_contract"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"No
amount_reuse_reviewbooleanNo
merchant_namestringYesMerchant business display name.
Invoice
FieldTypeRequiredDescription
idstringYes
base_amountstringYesExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
adjustmentstringYesExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
payable_amountstringYesExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
wallet_addressstringYes
status"pending" | "confirmed" | "expired" | "review"Yes
created_atstring (date-time)No
expires_atstring (date-time)No
reserved_untilstring (date-time)No
descriptionstringNo
tx_hashstring | nullNoTRON transaction hash of the matched USDT transfer (64 hex characters).
mode"live"YesInvoices are confirmed from verified TRON mainnet transfers.
network"tron-mainnet"No
token"USDT"No
token_contract"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"No
amount_reuse_reviewbooleanNo
checkout_urlstring (uri)No
checkout_tokenstringNoCapability token. Treat checkout URLs as confidential invoice links.
merchant_order_idstringYes
wallet_idstringYes
metadataobjectYes
CreateInvoice
FieldTypeRequiredDescription
merchant_order_idstringYesUnique per merchant. Reuse the original idempotency key for retries. — length 1–120
amountstringYesBase price in USDT; minimum 0.000001, maximum 1000000000. The server adds a disclosed identification adjustment. — pattern ^(0|[1-9][0-9]{0,9})(\.[0-9]{1,6})?$ · e.g. "49.95"
wallet_idstringYesID of a wallet registered to this merchant. — length 1–100
descriptionstringNolength 1–1000
metadataobjectNoJSON object, at most 16 KiB when serialized. Keep customer secrets out of metadata.
expires_in_minutesintegerNorange 1–1440 · default 20
InvoiceEnvelope
FieldTypeRequiredDescription
invoiceInvoiceYes
idempotent_replaybooleanNo
ApiKey
FieldTypeRequiredDescription
idstringYes
namestringYes
prefixstringYesFirst characters of the secret, for identification only.
mode"live"YesInvoices are confirmed from verified TRON mainnet transfers.
scopes"invoices:read" | "invoices:write" | "ledger:read"[]Yes
created_atstring (date-time)No
last_used_atstring | null (date-time)No
revoked_atstring | null (date-time)No
expires_atstring | null (date-time)NoNull when the key never expires.
expiredbooleanNo
Webhook
FieldTypeRequiredDescription
idstringYes
urlstring (uri)Yes
created_atstring (date-time)No
activebooleanYes
Delivery
FieldTypeRequiredDescription
idstringYes
webhook_idstringYes
event_idstringYes
status"pending" | "sending" | "delivered" | "failed" | "cancelled"Yes
attemptsintegerYes
next_attempt_atstring | null (date-time)No
last_errorstring | nullNo
response_statusinteger | nullNo
created_atstring (date-time)No
delivered_atstring | null (date-time)No
Event
FieldTypeRequiredDescription
idstringYes
type"invoice.created" | "invoice.confirmed" | "invoice.expired" | "invoice.review" | "webhook.test"Yes
created_atstring (date-time)Yes
mode"live"YesInvoices are confirmed from verified TRON mainnet transfers.
dataobjectYes
ConfirmedEvent
FieldTypeRequiredDescription
idstringYes
type"invoice.confirmed"Yes
created_atstring (date-time)Yes
mode"live"YesInvoices are confirmed from verified TRON mainnet transfers.
dataobjectYes
Dashboard
FieldTypeRequiredDescription
merchantMerchantYes
walletsWallet[]Yes
invoicesInvoice[]Yes
eventsEvent[]Yes
api_keysApiKey[]Yes
webhooksWebhook[]Yes
deliveriesDelivery[]Yes
statsobjectYes