Authentication
Every call carries your key and the business it's for:
Authorization: Bearer qp_sk_live_...
QwikiPay-Business: qp_biz_live_9f2c1a7e40b3d815
Your keys belong to your account: one public and one secret key for test, and the same for live. The business ID picks which of your businesses the payment belongs to, so each website's money lands in its own wallet. Each business has a test ID (qp_biz_test_...) and a live ID (qp_biz_live_...); send the one matching your key's mode, or the call is refused with business_id_mode_mismatch. Another account's business ID is refused too.
Secret key: your server only
- Use it from your server. A call with a secret key that comes from a web browser (it has an
Originheader) is refused withsecret_key_in_browser; if you see that, the key has leaked into a page: roll it. - Keep it in an environment variable or secret manager, never in your code repository.
- We show it once, when you create it, and store only a one-way hash. We can't show it again either.
- Optionally restrict your live secret key to your servers' IP addresses in Developers.
Public key: your web page
The public key only opens a checkout (drop-in). It can't read payments or balances. Calls with it must come from a page on your business's domain; we check the browser's Origin.
Your domain is checked
When you add a business you prove you own its domain. After that:
- Browser calls must come from that domain or one of its subdomains (
shop.example.com,pay.shop.example.com).example.com.evil.ionever matches. redirect_urland your webhook URL must behttps://addresses on that domain. In test modelocalhostand*.testalso work.
Rolling and revoking
- Roll a secret key to get a new one; the old one keeps working for 24 hours so you can deploy without downtime.
- Revoke a key and it stops working at once.
- Live key changes need a code from your authenticator app, and we email you about every key change.
Limits
300 calls a minute per key. Ten wrong keys from one address in ten minutes blocks that address for an hour. Request bodies are capped at 32 KB.