Connect an AI-built website
إذا موقعك مبني عبر Claude Code, Cursor, Replit Agent, Lovable, Bolt, v0, أو أي AI coding agent، انسخ البرومت أدناه وأعطه للأداة. سترى ضمن لوحة التحكم بعد التسجيل برومت مخصصاً بـ Branch ID و Webhook Secret حقيقيين، جاهز للصق.
Connect my website checkout/order system to OrderGer.
OrderGer is an external order receiving app for restaurants and shops. When a customer places an order on my website, send the full order details to OrderGer using the API below.
Important:
- Do NOT expose the API key in frontend code. Send the request from backend/server/API route only.
- After an order is successfully created on my website, send it to OrderGer.
- If OrderGer API fails, do not break the customer checkout. Save the order locally and log/retry the OrderGer sync.
- Prevent duplicate sends using the website order ID as external_order_id.
- Add a test mode and clear logs for success/failure.
- Add a webhook endpoint on my website to receive status updates from OrderGer (order.accepted, order.rejected, order.preparing, order.waiting_for_courier, order.on_the_way, order.delivered, order.cancelled, order.updated).
- Verify webhook signatures using HMAC-SHA256 with the webhook secret. The header is X-OrderGer-Signature: sha256=<hex>.
- Add a Test Webhook button.
API Base URL: https://orderger-api.hamidalqwaysim.workers.dev
Endpoints:
POST /api/v1/orders
PATCH /api/v1/orders/{id}
PATCH /api/v1/orders/{id}/status
POST /api/v1/orders/{id}/cancel
GET /api/v1/branches
Headers:
Authorization: Bearer YOUR_ORDERGER_API_KEY
Content-Type: application/json
X-OrderGer-Branch-ID: YOUR_BRANCH_ID
Branch ID: YOUR_BRANCH_ID (Get from OrderGer dashboard after signup)
API Key: YOUR_ORDERGER_API_KEY (Generate in Integration Center after signup)
After implementing:
1. Add admin settings for API Key, Branch ID, and webhook secret.
2. Add Send Test Order button.
3. Add Test Webhook button.
4. Show OrderGer sync status next to each order in admin.
5. Log every OrderGer API response.
6. Confirm orders arrive in the OrderGer mobile app with alarm.
7. Confirm webhook events update the order status on my website.
8. Make sure no secrets are ever in frontend bundles.