Environments
Test (sk_test_) and live (sk_live_): data, base URL and rules for each.
Clobepay has two separate environments. Each one is a different installation with its own database: a key, link or webhook from one environment never exists in the other.
| Test | Live | |
|---|---|---|
| Key prefix | sk_test_ | sk_live_ |
| Money | Test-environment funds | Live funds |
| livemode field in webhooks | false | true |
| Data | Test-environment data | Live data from your business |
| Requirements | Registered merchant | Verified merchant authorized for production |
Base URL
Every route lives under /api/v1. The test-environment base URL is https://api-staging.clobepay.com/api/v1. In production use the base URL of your account with an sk_live_ key. In the examples, $CLOBEPAY_API_BASE already includes /api/v1, so the same example works in both environments.
Rules
- A key from the wrong environment returns
401 api_key_wrong_environment. The test environment never issuessk_live_keys. - Never use real personal or card data in test.
- Webhook endpoints are registered per environment: create one in each.