kemBusiness
المنصةالمنتجكيف يعملالرواتبالأسعارالمطوّرونالأسئلة الشائعة
تسجيل الدخولابدأ الآن↗

وثائق المطورين

كل ما تحتاجه لاستقبال مدفوعات USDT عبر Kem Business API: المصادقة، ونقاط نهاية المدفوعات، وWebhooks موقّعة تقود حالة طلباتك.

المصادقةالمدفوعاتالأخطاء والحدودWebhooksالاختبار

المصادقة

أنشئ مفاتيح API من لوحة التحكم ضمن «مفاتيح API»، وأرسل المفتاح السري كـ Bearer token مع كل طلب. مفاتيح الاختبار (…sk_test_) تنشئ مدفوعات تجريبية؛ ومفاتيح التشغيل (…sk_live_) تحرّك أموالًا حقيقية.

Authorization: Bearer sk_live_...   # or sk_test_...
Base URL: https://api-business.kemapp.io

المدفوعات

أنشئ دفعة ووجّه عميلك إلى checkout_url المستضاف — تتولى Kem المحافظ والشبكات والتأكيدات. تابع الحالة بجلب الدفعة، أو بالأفضل عبر Webhooks.

POST/v1/payments
curl -X POST https://api-business.kemapp.io/v1/payments \
  -H "Authorization: Bearer sk_test_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: order-1042" \
  -d '{
    "amount": "25.000000",
    "currency": "USDT",
    "merchant_reference": "order-1042",
    "customer_email": "[email protected]",
    "description": "Pro plan",
    "return_url": "https://yourshop.example/thanks",
    "metadata": {"order_id": "1042"}
  }'
{
  "id": "pay_01J...",
  "status": "pending",
  "mode": "test",
  "amount": "25.000000",
  "amount_minor": 25000000,
  "amount_refunded_minor": 0,
  "fee_bps": null,
  "fee_minor": null,
  "net_minor": null,
  "currency": "USDT",
  "network": null,
  "merchant_reference": "order-1042",
  "checkout_url": "https://pay.kemapp.io/pay_01J...",
  "checkout_expires_at": "2026-07-13T13:30:00+00:00",
  "transaction_id": null,
  "detected_at": null,
  "confirmation_pending": false,
  "created_at": "2026-07-13T13:00:00+00:00",
  "updated_at": "2026-07-13T13:00:00+00:00"
}

Idempotency-Key — اختياري لكنه موصى به — إعادة المحاولة بنفس المفتاح تعيد الدفعة الأصلية بدلًا من إنشاء نسخة مكررة.

GET/v1/payments— query: status, limit (1–100, default 20), cursor · returns has_more, next_cursor
GET/v1/payments/{id}

amount — decimal string with 6 places ("25.000000"); amount_minor — the same value as an integer in micro-USDT.

fee_minor and net_minor are null while a payment is in flight and are frozen when it succeeds. Reconcile your payout against net_minor, not amount_minor — the difference is our fee (fee_bps).

دورة حياة الدفعة

pending → detected → succeeded · failed · expired

pending — بانتظار التحويل · detected — رُصدت على الشبكة وقيد التأكيد · succeeded — تأكدت الأموال في محفظتك (نفّذ الطلب عندها) · failed / expired — نهائية. تحديثات الاسترداد تصل كأحداث Webhook.

checkout window: 30 minutes, then → expired

الأخطاء والحدود

كل الأخطاء تستخدم غلافًا واحدًا. الرموز ثابتة — اعتمد على error.code لا على نص الرسالة.

HTTP 4xx/5xx
{
  "error": {
    "code": "idempotency_conflict",
    "message": "Idempotency-Key reused with a different request"
  }
}
401 unauthorizedmissing or invalid API key
404 payment_not_foundunknown payment id (or a live id with a test key)
409 idempotency_conflictIdempotency-Key reused with a different body — identical retries replay the original response
422 validation_errormalformed body — bad amount, unsupported currency. message reads “{field}: {reason}”
429 rate_limitedover the per-key budget: 100 writes/min, 1000 reads/min

المنتجات وروابط الدفع ونقاط Webhooks والاستردادات تُدار من لوحة التحكم — لا توجد لها نقاط REST عامة بعد.

Webhooks

أضف نقطة استقبال من لوحة التحكم ضمن «Webhooks» واختر الأحداث التي تهمك. كل نقطة تحصل على سرّ توقيع خاص (…whsec_) يظهر مرة واحدة عند الإنشاء.

payment.createdA payment intent was created (API or checkout link).
payment.detectedThe transfer was seen on-chain / in the KEM ledger; confirming.
payment.succeededFunds are confirmed in your business wallet. Fulfill on this event.
payment.failedThe payment failed.
payment.expiredThe checkout window closed without payment.
payment.confirmation_delayedThe customer paid, but it couldn't be confirmed inside the checkout window. Don't treat this as expired — hold the order.
payment.refund.createdA refund was initiated from the dashboard.
payment.refund.succeededThe refund settled back to the customer.

حمولة الحدث

{
  "id": "payment_event_01J...",
  "type": "payment.succeeded",
  "created": "2026-07-13T13:04:12+00:00",
  "data": {
    "payment": {
      "id": "pay_01J...",
      "status": "succeeded",
      "amount_minor": 25000000,
      "currency": "USDT",
      "merchant_reference": "order-1042",
      "network": "TRON",
      "product_id": null,
      "payment_link_id": null
    }
  }
}

التحقق من التوقيعات

كل تسليم يحمل ترويسة Kem-Signature. أعد حساب HMAC على «‎<t>.‎» متبوعة بجسم الطلب الخام باستخدام سرّ نقطتك، وقارن بزمن ثابت. ارفض أي شيء لا يطابق.

Kem-Signature: t=<unix_timestamp>,v1=<hmac_sha256_hex>

signed_input = "<t>." + raw_request_body
v1 = HMAC_SHA256(endpoint_secret, signed_input)   # secret: whsec_...

# reject replays: drop the delivery when |now - t| > 300s
import crypto from "node:crypto";

export function verifyKemSignature(rawBody, header, secret) {
  // header: "t=1720000000,v1=hex"
  const parts = Object.fromEntries(header.split(",").map((p) => p.split("=")));
  const expected = crypto
    .createHmac("sha256", secret)               // secret: whsec_...
    .update(`${parts.t}.`)
    .update(rawBody)                            // the RAW request bytes
    .digest("hex");
  return crypto.timingSafeEqual(Buffer.from(expected), Buffer.from(parts.v1));
}
import hashlib, hmac

def verify_kem_signature(raw_body: bytes, header: str, secret: str) -> bool:
    parts = dict(p.split("=") for p in header.split(","))
    expected = hmac.new(
        secret.encode(), f"{parts['t']}.".encode() + raw_body, hashlib.sha256
    ).hexdigest()
    return hmac.compare_digest(expected, parts["v1"])

التسليم وإعادة المحاولات

أجب بـ 2xx بسرعة. عمليات التسليم الفاشلة يُعاد المحاولة فيها بتباعد متزايد ثم تُحفظ كرسائل ميتة:

1m · 5m · 30m · 2h · 12h · 24h

الاختبار

بمفتاح اختبار يمكنك تمرير دفعة عبر دورة حياتها كاملة دون تحريك أموال — حاكِ الانتقالات وراقب Webhooks وهي تصل:

curl -X POST https://api-business.kemapp.io/v1/payments/{id}/_simulate/succeeded \
  -H "Authorization: Bearer sk_test_..."
BUILT IN THE GULF · SETTLED IN USDT ·
kemBusiness

احصل على مدفوعاتك
بالعملات المستقرة.

افتح لوحة التحكم واستقبل أول مدفوعاتك بعملة USDT اليوم — أو لنشرحها لك في مكالمة مدتها 20 دقيقة.

افتح لوحة التحكم↗احجز مكالمة↗

مشترك في kem بالفعل؟ تسجيل الدخول

المنتج

  • تسجيل الدخول
  • إنشاء حساب
  • احجز عرضًا توضيحيًا

Kem للجميع

  • تطبيق المستهلك
  • iOS — App Store
  • Android — Google Play

الشركة

  • استثمار Tether
  • سياسة الخصوصية
  • الشروط والأحكام

Kem منظومة متكاملة من خدمات الأصول الرقمية، تتيح للناس حول العالم الوصول إلى الحرية المالية.

© 2026 Kem · محتوى هذا الموقع، بما في ذلك جميع المعلومات والمواد والمستندات المتاحة من خلاله، سرّي ومملوك لـ KEM TECHNOLOGIES HOLDING Ltd، المسجّلة في سوق أبوظبي العالمي (رقم الشركة 000008598). ويُحظر تمامًا أي استخدام أو إفصاح أو توزيع أو استنساخ غير مصرّح به لهذا المحتوى، كليًا أو جزئيًا، دون موافقة خطية مسبقة من KEM TECHNOLOGIES HOLDING Ltd. [email protected]

صُنع في الخليج.