01
Public REST API
Add and redeem points and register customers from your system.
loyalty API
Connect loyalty to your POS or online store: a REST API to earn and redeem points, signed webhooks, idempotency keys, and a sandbox for developers to test.
curl -X POST https://walaay.com.sa/api/v1/transactions/earn \
-H "Authorization: Bearer $WALAAY_TOKEN" \
-H "Idempotency-Key: order_10231" \
-H "Content-Type: application/json" \
-d '{
"cardPublicCode": "WL-RST-4821",
"purchaseAmountHalalas": 4500
}'القدرات
Add and redeem points and register customers from your system.
Instant events for every loyalty action with automatic retries.
An idempotency key prevents awarding points twice during network interruptions.
Foodics, Odoo, Shopify, WooCommerce, and custom cashier systems.
Test keys to validate the flow before production.
Published usage limits and enterprise SLAs.
نقاط النهاية
/v1/auth/loginتسجيل الدخول والحصول على رمز الوصول/v1/stores/mineمتاجر الحساب الحالي/v1/stores/:storeId/cards/issueإصدار بطاقة لعميل/v1/stores/:storeId/transactions/earnإضافة نقاط أو ختم/v1/stores/:storeId/transactions/redeemاستبدال مكافأة/v1/cards/:publicCodeقراءة بطاقة برمزها العام/v1/stores/:storeId/statsإحصاءات المتجرWebhooks
card.issuedعند إصدار بطاقة جديدة لعميلtransaction.earnedعند إضافة نقاط أو ختمtransaction.redeemedعند استبدال مكافأةreward.unlockedعند اكتمال هدف الأختام أو النقاطsubscription.updatedعند تغيير باقة المتجرX-Walaay-Signature (HMAC-SHA256)، وإعادة المحاولة تتم تلقائياً بتباعد متزايد. استخدم Idempotency-Key لمنع تكرار منح النقاط.التكاملات