Rasel / Docs
AR
GET/api/v2/account/wallet/transactions

حركات المحفظة

سجل مدين ودائن مع الرصيد بعد كل حركة، ومنح الرسائل المجانية. لا تُعاد وسائل دفع أو أسرار.

مثال الاستجابة

لقطة تتضمن منح الرسائل المجانية

{
  "success": true,
  "data": {
    "transactions": [
      {
        "id": "6800bbb123def4567890aaaa",
        "amount": 0.12,
        "type": "debit",
        "source": "usage",
        "description": "SMS send",
        "balanceAfter": 4.88,
        "messageCount": 1,
        "walletTopupDiscountPercent": null,
        "walletTopupDiscountCouponCode": null,
        "createdAt": "2026-07-20T14:22:00.000Z"
      },
      {
        "id": "6800ccc123def4567890bbbb",
        "amount": 10,
        "type": "credit",
        "source": "admin_topup",
        "description": "Admin top-up",
        "balanceAfter": 5,
        "messageCount": null,
        "walletTopupDiscountPercent": null,
        "walletTopupDiscountCouponCode": null,
        "createdAt": "2026-07-18T09:00:00.000Z"
      }
    ],
    "freeMessageGrants": {
      "summary": {
        "totals": {
          "granted": 100,
          "consumed": 10,
          "reserved": 0,
          "withdrawn": 0,
          "remaining": 90,
          "activeRemaining": 90
        },
        "activeGrantCount": 1,
        "grantCount": 1,
        "byScope": [
          {
            "channel": "sms_local",
            "providerKey": null,
            "messageType": "all",
            "granted": 100,
            "consumed": 10,
            "reserved": 0,
            "withdrawn": 0,
            "remaining": 90,
            "activeRemaining": 90,
            "grantCount": 1
          }
        ]
      },
      "grants": [
        {
          "id": "6800abc123def4567890fedc",
          "channel": "sms_local",
          "providerKey": null,
          "messageType": "all",
          "initialQuantity": 100,
          "consumedQuantity": 10,
          "reservedQuantity": 0,
          "withdrawnQuantity": 0,
          "remainingQuantity": 90,
          "status": "active",
          "cycleStart": "2026-07-01T00:00:00.000Z",
          "cycleEnd": "2026-08-01T00:00:00.000Z",
          "expiresAt": "2026-08-31T23:59:59.000Z",
          "reason": "admin_gift",
          "userNote": "Complimentary SMS gift from support",
          "subscriptionId": null,
          "createdAt": "2026-07-15T10:00:00.000Z"
        }
      ]
    },
    "total": 2,
    "balance": 4.88,
    "skip": 0,
    "limit": 100
  }
}

سجل المحفظة بدون منح مجانية

{
  "success": true,
  "data": {
    "transactions": [
      {
        "id": "6800bbb123def4567890aaaa",
        "amount": 0.12,
        "type": "debit",
        "source": "usage",
        "description": "SMS send",
        "balanceAfter": 4.88,
        "messageCount": 1,
        "walletTopupDiscountPercent": null,
        "walletTopupDiscountCouponCode": null,
        "createdAt": "2026-07-20T14:22:00.000Z"
      },
      {
        "id": "6800ccc123def4567890bbbb",
        "amount": 10,
        "type": "credit",
        "source": "admin_topup",
        "description": "Admin top-up",
        "balanceAfter": 5,
        "messageCount": null,
        "walletTopupDiscountPercent": null,
        "walletTopupDiscountCouponCode": null,
        "createdAt": "2026-07-18T09:00:00.000Z"
      }
    ],
    "freeMessageGrants": {
      "summary": {
        "totals": {
          "granted": 0,
          "consumed": 0,
          "reserved": 0,
          "withdrawn": 0,
          "remaining": 0,
          "activeRemaining": 0
        },
        "activeGrantCount": 0,
        "grantCount": 0,
        "byScope": []
      },
      "grants": []
    },
    "total": 2,
    "balance": 4.88,
    "skip": 0,
    "limit": 100
  }
}

طلب HTTP

GET /api/v2/account/wallet/transactions

ترويسات الطلب

الترويسةالنوعالوصف
X-API-Keystringمفتاح Rasel API. أرسله في كل طلب موثّق ما عدا الويب هوك الوارد. *

معاملات الاستعلام

الحقلالنوعالوصف
skipintegerعدد الصفوف المراد تخطيها. الافتراضي 0.
limitintegerحجم الصفحة. عادة 1–50 لسياق المحادثة و1–500 لقوائم الحساب.
fromDatestringتاريخ البداية ضمن النطاق (YYYY-MM-DD).
toDatestringتاريخ النهاية ضمن النطاق (YYYY-MM-DD).
typecredit | debitقيمة الفلتر. في المحادثات: all أو direct أو group. في حركات المحفظة: credit أو debit.
sourceadmin_topup | usage | topup_request | default_plan_bonus | trial_balance | admin_withdrawal | subscription_refund | subscription_payment | coupon | send_failure_refundمصدر حركة المحفظة مثل usage أو admin_topup أو topup_request. في رفع الوسائط هو أصل الأصل المخزّن.

حقول الاستجابة

الحقلالنوعالوصفمثال
successbooleanصحيح عندما ينجح الإجراء، أو عندما ينجح مستلم واحد على الأقل في الدفعة.true
dataobjectالحمولة الأساسية لمسارات القائمة واللقطة.

رموز الحالة

الحالةالوصف
200نجاح.
401مفتاح API مفقود أو غير صالح.
403الهاتف غير موثّق، أو الصلاحية ناقصة، أو الحساب لا يستطيع تنفيذ هذا الإجراء.
429تم تجاوز حد المعدل، أو وصل عدد محاولات التحقق إلى الحد الأقصى.

جرّب الطلب

الاستجابة

نفّذ طلباً لعرض الاستجابة.