
توثيق واجهة التاجر البرمجية (Merchant API)
المصادقة عبر مفتاح خاص لكل تاجر. أرسل المفتاح في ترويسة Authorization: Bearer. كل العمليات المالية تدعم Idempotency-Key.
النقاط
- GET
/v1/products— الكتالوج بأسعارك المخصّصة - GET
/v1/balance— الرصيد والائتمان المتاح - POST
/v1/orders— إنشاء طلب (يدعم Idempotency-Key) - GET
/v1/orders/{id}— تفاصيل الطلب والفاتورة - GET
/v1/orders/{id}/codes— الأكواد المُسلّمة (مفكوكة، للمالك)
أمثلة cURL
# Catalog with your prices
curl https://app.abady.store/v1/products \
-H "Authorization: Bearer abdy_live_xxx"
# Balance
curl https://app.abady.store/v1/balance \
-H "Authorization: Bearer abdy_live_xxx"
# Place an order (idempotent)
curl -X POST https://app.abady.store/v1/orders \
-H "Authorization: Bearer abdy_live_xxx" \
-H "Idempotency-Key: 7f3b-…" \
-H "Content-Type: application/json" \
-d '{"items":[{"product_id":"aaaa…","quantity":2}]}'
# Fetch delivered codes (owner only, decrypted server-side)
curl https://app.abady.store/v1/orders/ORDER_ID/codes \
-H "Authorization: Bearer abdy_live_xxx"