المطورون

مرجع API

كل نقاط نهاية SMetaGateway REST، مولّدة من عقد OpenAPI 3.1. استخدم مفاتيح API من نوع Bearer من خادمك؛ المبالغ نصوص عشرية.

عنوان URL الأساسي
https://smg.sabco24.com/api/v1
الإصدار
0.2.0 · OpenAPI 3.1

نقاط النهاية

جميع العمليات مجمّعة حسب المورد.

الطريقةالمسارالوصفالمصادقة
النظام
GET/healthفحص سلامة الخدمة ووضع البوابة.عامة
GET/configقراءة إعدادات العميل العامة، بما فيها مفتاح موقع captcha.عامة
المصادقة
POST/auth/registerتسجيل تاجر وبدء جلسة المالك.عامة
POST/auth/loginتسجيل الدخول وبدء جلسة المالك.عامة
POST/auth/verify-emailتأكيد عنوان البريد الإلكتروني من الرابط المُرسل وبدء جلسة المالك.عامة
POST/auth/password/forgotإرسال رابط إعادة تعيين كلمة المرور بالبريد الإلكتروني.عامة
POST/auth/password/resetتعيين كلمة مرور جديدة من رابط إعادة التعيين وتسجيل الدخول.عامة
POST/auth/googleتسجيل الدخول أو التسجيل باستخدام Google وبدء جلسة المالك.عامة
GET/auth/sessionالتحقق مما إذا كان هذا المتصفح مسجّل الدخول.عامة
POST/auth/logoutإنهاء جلسة المالك الحالية.عامة
الحساب
GET/meجلب حساب التاجر والمحافظ والفواتير والمفاتيح وWebhooks والإحصاءات.جلسة المالك
PATCH/meتحديث الاسم المعروض للتاجر.جلسة المالك
المحافظ
GET/walletsعرض عناوين الاستلام المسجلة.مفتاح API أو جلسة
POST/walletsتسجيل عنوان استلام TRON صالح المجموع الاختباري (الملكية غير متحقق منها).جلسة المالك
الفواتير
GET/invoicesعرض أحدث 500 فاتورة.مفتاح API أو جلسة
POST/invoicesإنشاء فاتورة وحجز مبلغ دقيق فريد لمدة 90 يومًا.مفتاح 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 أو جلسة
Webhooks
POST/webhooksتسجيل نقطة Webhook عامة عبر HTTPS؛ يُعرض سر التوقيع مرة واحدة.جلسة المالك
DELETE/webhooks/{id}تعطيل نقطة نهاية وإلغاء عمليات التسليم المعلقة.جلسة المالك
POST/webhooks/{id}/testإرسال حدث webhook.test موقّع.جلسة المالك
POST/webhooks/deliveries/{id}/retryإعادة محاولة تسليم Webhook فاشل أو معلق.جلسة المالك
الدعم
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.

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

عامة

تسجيل الدخول أو التسجيل باستخدام 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

جلسة المالك

جلب حساب التاجر والمحافظ والفواتير والمفاتيح وWebhooks والإحصاءات.

تتطلب ملف تعريف ارتباط جلسة مالك لوحة التحكم؛ تُرفض مفاتيح 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

جلسة المالك

تسجيل عنوان استلام TRON صالح المجموع الاختباري (الملكية غير متحقق منها).

تتطلب ملف تعريف ارتباط جلسة مالك لوحة التحكم؛ تُرفض مفاتيح 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 أو جلسة

عرض أحدث 500 فاتورة.

يعيد: 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 أو جلسة

إنشاء فاتورة وحجز مبلغ دقيق فريد لمدة 90 يومًا.

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"

Webhooks

POST/api/v1/webhooks

جلسة المالك

تسجيل نقطة Webhook عامة عبر 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

جلسة المالك

إعادة محاولة تسليم Webhook فاشل أو معلق.

تتطلب ملف تعريف ارتباط جلسة مالك لوحة التحكم؛ تُرفض مفاتيح 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"}'

المخططات

الكائنات التي تعيدها الواجهة وتقبلها.

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نعم