Sandbox keys
Test keys (sk_test_ and pk_test_) work only on the separate sandbox deployment and its own API/frontend. Create test keys in the sandbox after developer approval there. Live keys are rejected by the sandbox; test keys are rejected by production.
Test numbers
| Number | Behavior |
|---|---|
| 0240000001 | Approves. |
| 0240000002 | Declines. |
| 0240000003 | Approves after 30 seconds. |
| 0240000004 | Never answers, so the payment expires. |
Any other number is refused in the sandbox with sandbox_test_number_required.
Test behavior
Use the normal payment and status flow with a test key. The payment response includes sandbox to indicate whether the request ran on the sandbox. Continue to verify idempotency, webhook signatures, event readiness, and your application's final-status handling before switching to live keys.