API keys and test mode
API keys#
Keys are made by the store owner on the store portal: Developers › API keys. A key acts as the store, so anyone holding it can place orders on the store's wallet: keep it on your server, never in a browser or an app.
- Send it in the header
Authorization: Api-Key <key>(orX-Api-Key: <key>). - A key is shown once. Dropoint keeps only a hash.
- New key gives a fresh key; the old one keeps working for 24 hours so you can swap it. Revoke stops a key at once.
- A key can be limited to your server's IP addresses.
- Up to 5 keys per store, 120 requests a minute each.
| Scope | Lets the key |
|---|---|
orders:quote | Price deliveries for your checkout |
orders:read | Read orders, website orders and the store's pricing |
orders:write | Send orders, approve them and mark them ready |
orders:cancel | Reject website orders; cancel orders before pickup |
wallet:read | Read the store's wallet balance |
webhooks:manage | Add and remove webhooks |
Test mode#
A key made with Test mode on starts dpk_test_. It works against the real Dropoint server, but:
- every order it sends is a pretend order: checked for real (phone, address, price), but never charged, never a real order, and never offered to a rider;
- pretend orders appear on the store portal under Developers › Test orders, not with real orders;
- you move them on with
POST stores/test/orders/{ref}/simulate/(assigned,arrived_pickup,picked_up,delivered,failed), or with the buttons on the portal; - webhooks still go to your addresses, with
"test": truein every message; stores/wallet/answers a pretend balance.
A test key can't touch real orders, and a live key can't simulate. Build and check everything with a test key, then make a live key to go live.