Quick Start
The integration involves two server-to-server API calls in your checkout flow:
- Validate the coupon token when a customer applies it at checkout.
- Redeem the coupon token when the order is confirmed.
Both endpoints require your API key, sent in the X-API-Key header.
https://api.beekeeper.bz/api/v1. Use HTTPS only.Authentication
All API calls require an API key passed in the X-API-Key header. Generate keys from your Merchant Dashboard.
Keep your API keys secret. Never expose them in client-side code or public repositories. Rotate compromised keys immediately from the dashboard.
Validate a Coupon
Call this when a customer enters a coupon code at checkout. Returns whether the coupon is valid and the calculated discount.
/coupon/validateRequest body
Example request & response
Redeem a Coupon
Call this after the order is confirmed and paid. This marks the coupon as used and triggers billing.
/coupon/redeemRequest body
Example request & response
order_ref per order. Re-sending the same order_ref for an already-redeemed coupon returns the original redemption β no double billing.Integration Flow
Here's the typical lifecycle of a Beekeeper coupon in your checkout flow:
POST /coupon/validatePOST /coupon/redeemCode Examples
Working snippets for the full validate-then-redeem flow:
Error Handling
All errors return a JSON object with error and message fields. HTTP status codes follow standard conventions.
Rate Limits
Each API key is rate-limited to protect platform stability. Limits are per-endpoint, per-API key.
retry_after field (in seconds). Implement exponential backoff in production.