توسعه‌دهندگان

مرجع API

همه اندپوینت‌های REST در SMetaGateway، تولیدشده از قرارداد OpenAPI 3.1. از سرور خود با کلید API نوع Bearer استفاده کنید؛ مبالغ رشته‌های اعشاری هستند.

آدرس پایه
https://smg.sabco24.com/api/v1
نسخه
0.2.0 · OpenAPI 3.1

اندپوینت‌ها

همه عملیات‌ها بر اساس منبع گروه‌بندی شده‌اند.

متدمسیرتوضیحاحراز هویت
سیستم
GET/healthبررسی سلامت سرویس و حالت درگاه.عمومی
GET/configخواندن پیکربندی عمومی کلاینت، از جمله کلید سایت کپچا.عمومی
احراز هویت
POST/auth/registerثبت‌نام فروشنده و شروع نشست مالک.عمومی
POST/auth/loginورود و شروع نشست مالک.عمومی
POST/auth/verify-emailتأیید نشانی ایمیل با پیوند ارسال‌شده و شروع نشست مالک.عمومی
POST/auth/password/forgotارسال پیوند بازنشانی گذرواژه به ایمیل.عمومی
POST/auth/password/resetتعیین گذرواژه جدید با پیوند بازنشانی و ورود.عمومی
POST/auth/googleورود یا ثبت‌نام با گوگل و شروع نشست مالک.عمومی
GET/auth/sessionبررسی اینکه آیا این مرورگر وارد شده است.عمومی
POST/auth/logoutپایان نشست فعلی مالک.عمومی
حساب
GET/meدریافت حساب فروشنده، کیف پول‌ها، فاکتورها، کلیدها، وب‌هوک‌ها و آمار.نشست مالک
PATCH/meبه‌روزرسانی نام نمایشی فروشنده.نشست مالک
کیف پول‌ها
GET/walletsفهرست آدرس‌های دریافت ثبت‌شده.کلید API یا نشست
POST/walletsثبت آدرس دریافت ترون با چک‌سام معتبر (مالکیت تأیید نشده است).نشست مالک
فاکتورها
GET/invoicesفهرست ۵۰۰ فاکتور اخیر.کلید API یا نشست
POST/invoicesساخت فاکتور و رزرو یک مبلغ دقیق و یکتا به مدت ۹۰ روز.کلید API یا نشست
GET/invoices/{id}دریافت یک فاکتور متعلق به این فروشنده.کلید API یا نشست
صفحه پرداخت
GET/checkout/{token}خواندن جزئیات ایمن پرداخت با توکن صفحه پرداخت.عمومی
کلیدهای API
POST/api-keysساخت کلید API با انقضای اختیاری؛ رمز فقط یک بار نمایش داده می‌شود.نشست مالک
POST/api-keys/{id}/rollجایگزینی کلید API با رمز جدید با همان نام و مدت اعتبار.نشست مالک
DELETE/api-keys/{id}لغو فوری کلید API.نشست مالک
دفتر
GET/ledger.csvخروجی کامل دفتر عملیاتی به‌صورت CSV.کلید API یا نشست
وب‌هوک‌ها
POST/webhooksثبت اندپوینت وب‌هوک عمومی HTTPS؛ رمز امضا فقط یک بار نمایش داده می‌شود.نشست مالک
DELETE/webhooks/{id}غیرفعال‌سازی اندپوینت و لغو ارسال‌های در انتظار.نشست مالک
POST/webhooks/{id}/testارسال رویداد امضاشده webhook.test.نشست مالک
POST/webhooks/deliveries/{id}/retryتلاش مجدد برای ارسال وب‌هوک ناموفق یا در انتظار.نشست مالک
پشتیبانی
POST/support/chatشروع گفت‌وگوی وب‌سایت با نام، ایمیل و اولین پیام؛ یک توکن خصوصی گفت‌وگو برمی‌گرداند.عمومی
GET/support/chatخواندن گفت‌وگوی وب‌سایت با توکن آن.عمومی
POST/support/chat/messagesارسال پیام بعدی در گفت‌وگوی وب‌سایت؛ گفت‌وگوی بسته دوباره باز می‌شود.عمومی
POST/support/contactارسال پیام به پشتیبانی بدون حساب کاربری.عمومی
GET/support/ticketsفهرست تیکت‌های پشتیبانی شما.نشست مالک
POST/support/ticketsباز کردن تیکت پشتیبانی.نشست مالک
GET/support/tickets/{id}خواندن یکی از تیکت‌ها همراه با پیام‌هایش.نشست مالک
POST/support/tickets/{id}/messagesپاسخ به تیکت؛ تیکت بسته دوباره باز می‌شود.نشست مالک
POST/support/tickets/{id}/closeبستن تیکت.نشست مالک
GET/support/inboxتیم پشتیبانی: فهرست همه تیکت‌ها، ابتدا تیکت‌های باز.نشست مالک
GET/support/inbox/{id}تیم پشتیبانی: خواندن تیکت همراه با اطلاعات تماس.نشست مالک
POST/support/inbox/{id}/messagesتیم پشتیبانی: پاسخ به تیکت فروشنده.نشست مالک
POST/support/inbox/{id}/statusتیم پشتیبانی: تغییر وضعیت تیکت.نشست مالک

سیستم

GET/api/v1/health

عمومی

بررسی سلامت سرویس و حالت درگاه.

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
status"ok"خیر
mode"live"خیرInvoices are confirmed from verified TRON mainnet transfers.
live_payments_enabledtrueخیر

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/health"

GET/api/v1/config

عمومی

خواندن پیکربندی عمومی کلاینت، از جمله کلید سایت کپچا.

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

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
captchaobjectبله
googleobjectبله

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/config"

احراز هویت

POST/api/v1/auth/register

عمومی

ثبت‌نام فروشنده و شروع نشست مالک.

No session is started. The account can sign in after the emailed link (valid 24 hours, single use) is confirmed with POST /auth/verify-email. Answers 503 email_unavailable when the server cannot send email.

بدنه درخواست

فیلدنوعالزامیتوضیح
emailstring (email)بله
passwordstring (password)بلهlength 12–128
captcha_tokenstringخیرCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
namestringخیرlength 0–100
locale"en" | "fa" | "ar" | "zh" | "es" | "fr" | "ru"خیرLanguage of the email. — default "en"
خروجی: 201 application/json
فیلدنوعالزامیتوضیح
verification_requiredtrueبله
emailstring (email)بله
email_sentbooleanبلهFalse when the SMTP server rejected the message; signing in later sends a new link.

پاسخ‌ها

  • 201Account created; confirmation email sent
  • 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
  • 503Email delivery is not configured (email_unavailable) or captcha verification is unavailable
نمونه درخواست
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","locale":"en"}'

POST/api/v1/auth/login

عمومی

ورود و شروع نشست مالک.

An account whose email is not yet confirmed answers 403 email_not_verified after a correct password, and a new confirmation link is emailed at most every 5 minutes.

بدنه درخواست

فیلدنوعالزامیتوضیح
emailstring (email)بله
passwordstring (password)بلهlength 10–128
captcha_tokenstringخیرCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
locale"en" | "fa" | "ar" | "zh" | "es" | "fr" | "ru"خیرLanguage of the email. — default "en"
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
merchantMerchantخیر

پاسخ‌ها

  • 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
نمونه درخواست
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/verify-email

عمومی

تأیید نشانی ایمیل با پیوند ارسال‌شده و شروع نشست مالک.

token comes from the #verify= fragment of the emailed link. Tokens are single use; a newer email replaces older links.

بدنه درخواست

فیلدنوعالزامیتوضیح
tokenstringبلهSingle-use token from the emailed link. — pattern ^[A-Za-z0-9_-]{43}$
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
merchantMerchantخیر

پاسخ‌ها

  • 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
نمونه درخواست
curl -X POST "https://smg.sabco24.com/api/v1/auth/verify-email" \
  -H "Content-Type: application/json" \
  -d '{"token":"TOKEN_FROM_THE_EMAILED_LINK"}'

POST/api/v1/auth/password/forgot

عمومی

ارسال پیوند بازنشانی گذرواژه به ایمیل.

Always answers 202 whether or not an account exists. The link is valid for 1 hour and single use.

بدنه درخواست

فیلدنوعالزامیتوضیح
emailstring (email)بله
captcha_tokenstringخیرCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
locale"en" | "fa" | "ar" | "zh" | "es" | "fr" | "ru"خیرLanguage of the email. — default "en"
خروجی: 202 application/json
فیلدنوعالزامیتوضیح
successtrueبله

پاسخ‌ها

  • 202Accepted
  • 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
  • 503Email delivery is not configured (email_unavailable) or captcha verification is unavailable
نمونه درخواست
curl -X POST "https://smg.sabco24.com/api/v1/auth/password/forgot" \
  -H "Content-Type: application/json" \
  -d '{"email":"merchant@example.com","locale":"en"}'

POST/api/v1/auth/password/reset

عمومی

تعیین گذرواژه جدید با پیوند بازنشانی و ورود.

token comes from the #reset= fragment of the emailed link. Every existing session of the account is revoked, and the email counts as confirmed.

بدنه درخواست

فیلدنوعالزامیتوضیح
tokenstringبلهSingle-use token from the emailed link. — pattern ^[A-Za-z0-9_-]{43}$
passwordstring (password)بلهlength 12–128
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
merchantMerchantخیر

پاسخ‌ها

  • 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
نمونه درخواست
curl -X POST "https://smg.sabco24.com/api/v1/auth/password/reset" \
  -H "Content-Type: application/json" \
  -d '{"token":"TOKEN_FROM_THE_EMAILED_LINK","password":"a-new-long-unique-passphrase"}'

POST/api/v1/auth/google

عمومی

ورود یا ثبت‌نام با گوگل و شروع نشست مالک.

Send the credential returned by Google Identity Services. The server verifies the RS256 signature against Google keys, the issuer, audience (GOOGLE_CLIENT_ID), expiry and email_verified. A new email creates an account (201). An existing confirmed account with the same email is linked to the Google account on first use; an unconfirmed one is claimed by the Google owner and its password stops working.

بدنه درخواست

فیلدنوعالزامیتوضیح
credentialstringبلهGoogle ID token (JWT). — length 20–4096
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
merchantMerchantخیر

پاسخ‌ها

  • 200Signed in
  • 201Account created
  • 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
  • 503Google keys are temporarily unreachable
نمونه درخواست
curl -X POST "https://smg.sabco24.com/api/v1/auth/google" \
  -H "Content-Type: application/json" \
  -d '{"credential":"GOOGLE_ID_TOKEN_FROM_GOOGLE_IDENTITY_SERVICES"}'

GET/api/v1/auth/session

عمومی

بررسی اینکه آیا این مرورگر وارد شده است.

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
signed_inbooleanبله

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/auth/session"

POST/api/v1/auth/logout

عمومی

پایان نشست فعلی مالک.

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
successtrueبله

پاسخ‌ها

  • 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
نمونه درخواست
curl -X POST "https://smg.sabco24.com/api/v1/auth/logout" \
  -H "Content-Type: application/json" \
  -d '{}'

حساب

GET/api/v1/me

نشست مالک

دریافت حساب فروشنده، کیف پول‌ها، فاکتورها، کلیدها، وب‌هوک‌ها و آمار.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

خروجی: 200 Dashboard
فیلدنوعالزامیتوضیح
merchantMerchantبله
walletsWallet[]بله
invoicesInvoice[]بله
eventsEvent[]بله
api_keysApiKey[]بله
webhooksWebhook[]بله
deliveriesDelivery[]بله
statsobjectبله

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

به‌روزرسانی نام نمایشی فروشنده.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

بدنه درخواست

فیلدنوعالزامیتوضیح
namestringبلهlength 1–100
خروجی: 200 Dashboard
فیلدنوعالزامیتوضیح
merchantMerchantبله
walletsWallet[]بله
invoicesInvoice[]بله
eventsEvent[]بله
api_keysApiKey[]بله
webhooksWebhook[]بله
deliveriesDelivery[]بله
statsobjectبله

پاسخ‌ها

  • 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
نمونه درخواست
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"}'

کیف پول‌ها

GET/api/v1/wallets

کلید API یا نشست

فهرست آدرس‌های دریافت ثبت‌شده.

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
walletsWallet[]خیر

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/wallets" \
  -H "Authorization: Bearer $SMETA_API_KEY"

POST/api/v1/wallets

نشست مالک

ثبت آدرس دریافت ترون با چک‌سام معتبر (مالکیت تأیید نشده است).

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

بدنه درخواست

فیلدنوعالزامیتوضیح
labelstringبلهlength 1–80
addressstringبلهpattern ^T[1-9A-HJ-NP-Za-km-z]{33}$
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
walletWalletخیر

پاسخ‌ها

  • 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
نمونه درخواست
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"}'

فاکتورها

GET/api/v1/invoices

کلید API یا نشست

فهرست ۵۰۰ فاکتور اخیر.

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
invoicesInvoice[]خیر

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/invoices" \
  -H "Authorization: Bearer $SMETA_API_KEY"

POST/api/v1/invoices

کلید API یا نشست

ساخت فاکتور و رزرو یک مبلغ دقیق و یکتا به مدت ۹۰ روز.

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.

هدرهای الزامی

فیلدنوعالزامیتوضیح
Idempotency-Keystringبلهکلیدی یکتا برای هر تلاش ساخت فاکتور؛ هنگام تلاش مجدد از همان کلید استفاده کنید.

بدنه درخواست CreateInvoice

فیلدنوعالزامیتوضیح
merchant_order_idstringبلهUnique per merchant. Reuse the original idempotency key for retries. — length 1–120
amountstringبلهBase 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_idstringبلهID of a wallet registered to this merchant. — length 1–100
descriptionstringخیرlength 1–1000
metadataobjectخیرJSON object, at most 16 KiB when serialized. Keep customer secrets out of metadata.
expires_in_minutesintegerخیرrange 1–1440 · default 20
خروجی: 200 InvoiceEnvelope
فیلدنوعالزامیتوضیح
invoiceInvoiceبله
idempotent_replaybooleanخیر

پاسخ‌ها

  • 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
نمونه درخواست
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 یا نشست

دریافت یک فاکتور متعلق به این فروشنده.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهInvoice ID
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
invoiceInvoiceخیر

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/invoices/ID" \
  -H "Authorization: Bearer $SMETA_API_KEY"

صفحه پرداخت

GET/api/v1/checkout/{token}

عمومی

خواندن جزئیات ایمن پرداخت با توکن صفحه پرداخت.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
tokenstringبلهCheckout capability token from checkout_url
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
invoiceCheckoutInvoiceخیر

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/checkout/TOKEN"

کلیدهای API

POST/api/v1/api-keys

نشست مالک

ساخت کلید API با انقضای اختیاری؛ رمز فقط یک بار نمایش داده می‌شود.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

بدنه درخواست

فیلدنوعالزامیتوضیح
namestringبلهlength 1–80
expires_in_daysinteger | nullخیرDays until the key expires. Omit or send null for a key that never expires. — range 1–3650 · e.g. 90
خروجی: 201 application/json
فیلدنوعالزامیتوضیح
api_keyApiKey & objectخیر
secretstringخیر
warningstringخیر

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

جایگزینی کلید API با رمز جدید با همان نام و مدت اعتبار.

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

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهAPI key ID
خروجی: 201 application/json
فیلدنوعالزامیتوضیح
api_keyApiKey & objectخیر
secretstringخیر
warningstringخیر
replaced_key_idstringخیر

پاسخ‌ها

  • 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
نمونه درخواست
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}

نشست مالک

لغو فوری کلید API.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهAPI key ID
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
successtrueبله

پاسخ‌ها

  • 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
نمونه درخواست
curl -X DELETE "https://smg.sabco24.com/api/v1/api-keys/ID" \
  -H "Cookie: smg_session=$SESSION" \
  -H "Origin: https://smg.sabco24.com"

دفتر

GET/api/v1/ledger.csv

کلید API یا نشست

خروجی کامل دفتر عملیاتی به‌صورت CSV.

خروجی: 200 text/csv

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/ledger.csv" \
  -H "Authorization: Bearer $SMETA_API_KEY"

وب‌هوک‌ها

POST/api/v1/webhooks

نشست مالک

ثبت اندپوینت وب‌هوک عمومی HTTPS؛ رمز امضا فقط یک بار نمایش داده می‌شود.

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

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

بدنه درخواست

فیلدنوعالزامیتوضیح
urlstring (uri)بلهlength 0–2048
خروجی: 201 application/json
فیلدنوعالزامیتوضیح
webhookWebhook & objectخیر
secretstringخیر

پاسخ‌ها

  • 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
نمونه درخواست
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}

نشست مالک

غیرفعال‌سازی اندپوینت و لغو ارسال‌های در انتظار.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهWebhook ID
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
successtrueبله

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

ارسال رویداد امضاشده webhook.test.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهWebhook ID
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
eventEventخیر
deliveriesDelivery[]خیر

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

تلاش مجدد برای ارسال وب‌هوک ناموفق یا در انتظار.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهDelivery ID
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
deliveryDeliveryخیر

پاسخ‌ها

  • 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
نمونه درخواست
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.

هدرهای الزامی

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

پاسخ‌ها

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

پشتیبانی

POST/api/v1/support/chat

عمومی

شروع گفت‌وگوی وب‌سایت با نام، ایمیل و اولین پیام؛ یک توکن خصوصی گفت‌وگو برمی‌گرداند.

Opens a ticket from the visitor's first message, name and email. The response contains chat_token, shown only here; send it as X-Support-Chat-Token to read replies and continue. Contact details are never echoed back.

بدنه درخواست

فیلدنوعالزامیتوضیح
messagestringبلهlength 1–5000
namestringبلهlength 1–100
emailstring (email)بلهlength 0–254
captcha_tokenstringخیرCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
خروجی: 201 application/json
فیلدنوعالزامیتوضیح
chat_tokenstringبلهPrivate bearer token for this conversation.
ticketobjectبله
namestringبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
curl -X POST "https://smg.sabco24.com/api/v1/support/chat" \
  -H "Content-Type: application/json" \
  -d '{"message":"Do you support WooCommerce?","name":"Jane Doe","email":"jane@example.com","captcha_token":"TURNSTILE_RESPONSE_TOKEN"}'

GET/api/v1/support/chat

عمومی

خواندن گفت‌وگوی وب‌سایت با توکن آن.

هدرهای الزامی

فیلدنوعالزامیتوضیح
X-Support-Chat-Tokenstringبلهchat_token returned when the chat was started. Keep it private; it is the only key to this conversation.
خروجی: 200 application/json
فیلدنوعالزامیتوضیح
ticketobjectبله
namestringبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
curl -X GET "https://smg.sabco24.com/api/v1/support/chat" \
  -H "X-Support-Chat-Token: VALUE"

POST/api/v1/support/chat/messages

عمومی

ارسال پیام بعدی در گفت‌وگوی وب‌سایت؛ گفت‌وگوی بسته دوباره باز می‌شود.

هدرهای الزامی

فیلدنوعالزامیتوضیح
X-Support-Chat-Tokenstringبلهchat_token returned when the chat was started. Keep it private; it is the only key to this conversation.

بدنه درخواست

فیلدنوعالزامیتوضیح
messagestringبلهlength 1–5000
خروجی: 201 application/json
فیلدنوعالزامیتوضیح
ticketobjectبله
namestringبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
curl -X POST "https://smg.sabco24.com/api/v1/support/chat/messages" \
  -H "X-Support-Chat-Token: VALUE" \
  -H "Content-Type: application/json" \
  -d '{"message":"Thanks, that helps."}'

POST/api/v1/support/contact

عمومی

ارسال پیام به پشتیبانی بدون حساب کاربری.

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

بدنه درخواست

فیلدنوعالزامیتوضیح
namestringبلهlength 1–100
emailstring (email)بلهlength 0–254
subjectstringبلهlength 1–150
category"general" | "payments" | "technical" | "account" | "other"خیرdefault "general"
messagestringبلهlength 1–5000
captcha_tokenstringخیرCloudflare Turnstile response token. Required when GET /config returns a captcha site key; each token is single use. — length 0–2048
خروجی: 201 application/json
فیلدنوعالزامیتوضیح
ticketobjectخیر

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

فهرست تیکت‌های پشتیبانی شما.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
ticketsSupportTicket[]خیر

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

باز کردن تیکت پشتیبانی.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

بدنه درخواست

فیلدنوعالزامیتوضیح
subjectstringبلهlength 1–150
category"general" | "payments" | "technical" | "account" | "other"خیرdefault "general"
messagestringبلهlength 1–5000
خروجی: 201 SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
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}

نشست مالک

خواندن یکی از تیکت‌ها همراه با پیام‌هایش.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهTicket ID
خروجی: 200 SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

پاسخ به تیکت؛ تیکت بسته دوباره باز می‌شود.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهTicket ID

بدنه درخواست

فیلدنوعالزامیتوضیح
messagestringبلهlength 1–5000
خروجی: 201 SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

بستن تیکت.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهTicket ID
خروجی: 200 SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

تیم پشتیبانی: فهرست همه تیکت‌ها، ابتدا تیکت‌های باز.

Requires a session for an account listed in SUPPORT_STAFF_EMAILS.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

خروجی: 200 application/json
فیلدنوعالزامیتوضیح
ticketsSupportTicket[]خیر

پاسخ‌ها

  • 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
نمونه درخواست
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}

نشست مالک

تیم پشتیبانی: خواندن تیکت همراه با اطلاعات تماس.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهTicket ID
خروجی: 200 SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

تیم پشتیبانی: پاسخ به تیکت فروشنده.

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

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهTicket ID

بدنه درخواست

فیلدنوعالزامیتوضیح
messagestringبلهlength 1–5000
خروجی: 201 SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
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

نشست مالک

تیم پشتیبانی: تغییر وضعیت تیکت.

به کوکی نشست مالک داشبورد نیاز دارد؛ کلیدهای API برای این عملیات پذیرفته نمی‌شوند.

پارامترهای مسیر

فیلدنوعالزامیتوضیح
idstringبلهTicket ID

بدنه درخواست

فیلدنوعالزامیتوضیح
status"open" | "answered" | "closed"بله
خروجی: 200 SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله

پاسخ‌ها

  • 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
نمونه درخواست
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"}'

اسکیماها

اشیایی که API برمی‌گرداند و می‌پذیرد.

Error
فیلدنوعالزامیتوضیح
errorobjectبله
mode"live"بلهInvoices are confirmed from verified TRON mainnet transfers.
Merchant
فیلدنوعالزامیتوضیح
idstringبله
namestringبله
emailstring (email)بله
mode"live"بلهInvoices are confirmed from verified TRON mainnet transfers.
support_staffbooleanخیرTrue when this account is listed in SUPPORT_STAFF_EMAILS and may use the support inbox.
SupportTicket
فیلدنوعالزامیتوضیح
idstringبله
referencestringبلهHuman-friendly reference such as SMG-1A2B3C4D5E.
subjectstringبله
category"general" | "payments" | "technical" | "account" | "other"بلهdefault "general"
status"open" | "answered" | "closed"بلهopen: waiting for support; answered: support replied; closed: resolved.
source"dashboard" | "contact" | "chat"بلهdashboard: merchant ticket; contact: contact form, answered by email; chat: website chat widget, answered in place.
created_atstring (date-time)بله
updated_atstring (date-time)بله
namestringخیرSupport inbox only.
emailstring (email)خیرSupport inbox only.
merchant_idstring | nullخیرSupport inbox only. Null for contact-form and website-chat tickets.
merchant_namestring | nullخیرSupport inbox only.
SupportMessage
فیلدنوعالزامیتوضیح
idstringبله
author"customer" | "staff"بله
bodystringبله
created_atstring (date-time)بله
SupportThread
فیلدنوعالزامیتوضیح
ticketSupportTicketبله
messagesSupportMessage[]بله
Wallet
فیلدنوعالزامیتوضیح
idstringبله
labelstringبله
addressstringبله
network"tron-mainnet"بله
verifiedfalseبله
verification_status"unverified"بله
created_atstring (date-time)بله
CheckoutInvoice
فیلدنوعالزامیتوضیح
idstringبله
base_amountstringبلهExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
adjustmentstringبلهExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
payable_amountstringبلهExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
wallet_addressstringبله
status"pending" | "confirmed" | "expired" | "review"بله
created_atstring (date-time)خیر
expires_atstring (date-time)خیر
reserved_untilstring (date-time)خیر
descriptionstringخیر
tx_hashstring | nullخیرTRON transaction hash of the matched USDT transfer (64 hex characters).
mode"live"بلهInvoices are confirmed from verified TRON mainnet transfers.
network"tron-mainnet"خیر
token"USDT"خیر
token_contract"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"خیر
amount_reuse_reviewbooleanخیر
merchant_namestringبلهMerchant business display name.
Invoice
فیلدنوعالزامیتوضیح
idstringبله
base_amountstringبلهExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
adjustmentstringبلهExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
payable_amountstringبلهExact USDT decimal string, six fractional digits in responses. Never a floating point number. — pattern ^[0-9]+\.[0-9]{6}$ · e.g. "49.953821"
wallet_addressstringبله
status"pending" | "confirmed" | "expired" | "review"بله
created_atstring (date-time)خیر
expires_atstring (date-time)خیر
reserved_untilstring (date-time)خیر
descriptionstringخیر
tx_hashstring | nullخیرTRON transaction hash of the matched USDT transfer (64 hex characters).
mode"live"بلهInvoices are confirmed from verified TRON mainnet transfers.
network"tron-mainnet"خیر
token"USDT"خیر
token_contract"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t"خیر
amount_reuse_reviewbooleanخیر
checkout_urlstring (uri)خیر
checkout_tokenstringخیرCapability token. Treat checkout URLs as confidential invoice links.
merchant_order_idstringبله
wallet_idstringبله
metadataobjectبله
CreateInvoice
فیلدنوعالزامیتوضیح
merchant_order_idstringبلهUnique per merchant. Reuse the original idempotency key for retries. — length 1–120
amountstringبلهBase 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_idstringبلهID of a wallet registered to this merchant. — length 1–100
descriptionstringخیرlength 1–1000
metadataobjectخیرJSON object, at most 16 KiB when serialized. Keep customer secrets out of metadata.
expires_in_minutesintegerخیرrange 1–1440 · default 20
InvoiceEnvelope
فیلدنوعالزامیتوضیح
invoiceInvoiceبله
idempotent_replaybooleanخیر
ApiKey
فیلدنوعالزامیتوضیح
idstringبله
namestringبله
prefixstringبلهFirst characters of the secret, for identification only.
mode"live"بلهInvoices are confirmed from verified TRON mainnet transfers.
scopes"invoices:read" | "invoices:write" | "ledger:read"[]بله
created_atstring (date-time)خیر
last_used_atstring | null (date-time)خیر
revoked_atstring | null (date-time)خیر
expires_atstring | null (date-time)خیرNull when the key never expires.
expiredbooleanخیر
Webhook
فیلدنوعالزامیتوضیح
idstringبله
urlstring (uri)بله
created_atstring (date-time)خیر
activebooleanبله
Delivery
فیلدنوعالزامیتوضیح
idstringبله
webhook_idstringبله
event_idstringبله
status"pending" | "sending" | "delivered" | "failed" | "cancelled"بله
attemptsintegerبله
next_attempt_atstring | null (date-time)خیر
last_errorstring | nullخیر
response_statusinteger | nullخیر
created_atstring (date-time)خیر
delivered_atstring | null (date-time)خیر
Event
فیلدنوعالزامیتوضیح
idstringبله
type"invoice.created" | "invoice.confirmed" | "invoice.expired" | "invoice.review" | "webhook.test"بله
created_atstring (date-time)بله
mode"live"بلهInvoices are confirmed from verified TRON mainnet transfers.
dataobjectبله
ConfirmedEvent
فیلدنوعالزامیتوضیح
idstringبله
type"invoice.confirmed"بله
created_atstring (date-time)بله
mode"live"بلهInvoices are confirmed from verified TRON mainnet transfers.
dataobjectبله
Dashboard
فیلدنوعالزامیتوضیح
merchantMerchantبله
walletsWallet[]بله
invoicesInvoice[]بله
eventsEvent[]بله
api_keysApiKey[]بله
webhooksWebhook[]بله
deliveriesDelivery[]بله
statsobjectبله