- Keep the secret server-side only — not in frontend code, not in Git, not in logs. Use environment variables or a KMS.
- Live and test keys have different prefixes (
sk_live_/sk_test_) so a mix-up is visible at a glance. - Enable the IP allowlist. The merchant API is meant for your server only; browsers should never call it directly.
- Deliver only after signature verification, and cross-check amount and order reference against your own records.
- Poll the query endpoint as a fallback for missed webhooks.
- Refund to the original address only. Never accept a user-supplied address — that is the standard shape of overpayment fraud.
Documentation·Updated 2026-12-04·3 min read
Security checklist
Keep secrets server-side, distinguish sk_live_ from sk_test_, enable the IP allowlist, deliver only after signature verification, poll as a fallback, and never refund to a user-supplied address.