API ตัวแทนจำหน่าย eSIMDual

Use the eSIMDual reseller API in your own website or app

เอกสารนี้ครอบคลุมการยืนยันตัวตน แพ็กเกจ ราคาสำหรับ reseller แผน VPN คำสั่งซื้อ ข้อมูล eSIM ข้อมูล wallet และ payload ของ webhook สำหรับ API reseller ใช้เอกสารอ้างอิงออนไลน์หรือดาวน์โหลดไฟล์ OpenAPI JSON สำหรับ Postman, Insomnia หรือเครื่องมือเชื่อมต่อของคุณ

เริ่มต้นอย่างรวดเร็ว
  • 1สร้างโทเค็น API ด้วยคำสั่ง POST /login
  • 2ส่งโทเค็น Bearer ไปยังปลายทางที่ได้รับการป้องกันทั้งหมด
  • 3ใช้ Idempotency-Key ในการสร้างคำสั่งซื้อ
  • 4อ่านแผน VPN ด้วย GET /vpn/plans เมื่อคุณขายตัวเลือก Secure VPN
  • 5ยกเลิกสมาชิก VPN reseller ด้วย POST /vpn/subscriptions/{id}/cancel เมื่อลูกค้าของคุณสิ้นสุดบริการ
  • 6ตรวจสอบอัปเดต SaaS ด้วย GET /updates/latest
  • 7ตรวจสอบความถูกต้องของลายเซ็นเว็บฮุคด้วยรหัสลับที่ใช้ร่วมกันของคุณ
URL พื้นฐาน https://esimdual.com/api/reseller/v1
การตรวจสอบสิทธิ์ Authorization: Bearer <token>
ภาวะเสื่อมสมรรถภาพทางเพศ Idempotency-Key: unique-order-key
ตัวอย่างคำขอเข้าสู่ระบบ
curl --request POST 'https://esimdual.com/api/reseller/v1/login' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "partner@example.com",
    "password": "StrongPassword123!",
    "device_name": "production-server"
  }'
ตัวอย่างใบสั่งซื้อ
curl --request POST 'https://esimdual.com/api/reseller/v1/orders' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Idempotency-Key: ORDER-2026-0001' \
  --header 'Content-Type: application/json' \
  --data '{
    "package_id": 1120,
    "external_order_id": "NOANET-2026-0001",
    "device_imei": "356938035643809"
  }'
ตัวอย่างคำขอแผน VPN
curl --request GET 'https://esimdual.com/api/reseller/v1/vpn/plans' \
  --header 'Authorization: Bearer YOUR_TOKEN'

ฟิลด์ price_for_reseller คือจำนวนเงินที่ eSIMDual เรียกเก็บจาก reseller ร้านค้าของคุณสามารถเพิ่มราคาขายให้ลูกค้าเองได้

ตัวอย่างคำสั่งซื้อ VPN
curl --request POST 'https://esimdual.com/api/reseller/v1/vpn/orders' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --header 'Idempotency-Key: VPN-2026-0001' \
  --header 'Content-Type: application/json' \
  --data '{
    "vpn_plan_id": 1,
    "external_subscription_id": "VPN-CUSTOMER-0001",
    "customer_reference": "customer@example.com",
    "customer_price": 4.99
  }'
ตัวอย่างการตรวจสอบอัปเดต SaaS
curl --request GET 'https://esimdual.com/api/reseller/v1/updates/latest?current_version=1.0.0&channel=stable' \
  --header 'Authorization: Bearer YOUR_TOKEN'

endpoint อัปเดตใช้สำหรับ release ของ storefront SaaS แบบ hosted หรือ self-hosted และยืนยันตัวตนด้วย Bearer token reseller เดียวกัน

เหตุการณ์ Webhook

eSIMDual จะลงนามข้อมูล webhook ด้วย HMAC SHA-256 โดยใช้รหัสลับ webhook ของคุณ

ping order.completed order.processing order.failed vpn.subscription.active vpn.subscription.cancelled vpn.subscription.expired vpn.subscription.failed
X-eSIMDual-Event
X-eSIMDual-Delivery
X-eSIMDual-Signature

Nous pouvons utiliser des cookies ou toute autre technologie de suivi lorsque vous visitez notre site web, ainsi que tout autre support, site web mobile ou application mobile lié ou connecté, afin de personnaliser le Site et d’améliorer votre expérience. เรียนรู้เพิ่มเติม

อนุญาต