Environments
Single Endpoint
Both production and sandbox use the same API endpoint:
https://api.recivr.comThe JWT environment claim determines behavior:
- Live tokens (
live_prefix) → fees calculated and persisted to analytics - Sandbox tokens (
test_prefix) → fees calculated with the same rules but not persisted — no impact on dashboard analytics
Switch from sandbox to live by swapping the token. No URL change, no code change.
Sandbox
Use sandbox tokens to validate your integration before going live.
Getting a Sandbox Key:
- Login to dashboard.recivr.com
- Select your entity → API Tokens
- Click Generate Sandbox Key
- Copy the
test_...token
Sandbox tokens produce valid fee calculations using the same rules, but results are not persisted and rate limits are relaxed.
Going Live
- Generate a Live Key in the dashboard
- Replace
test_...token withlive_...token in your configuration - No URL change, no code change — same endpoint, same request format
Test BIN Ranges
The sandbox database includes synthetic BIN ranges for testing:
| BIN | Scheme | Issuer Country | Card Type | Region (vs GB acquirer) |
|---|---|---|---|---|
40000000 | Visa | DE | Consumer Debit | INTRA_EEA |
41111111 | Visa | US | Consumer Credit | INTER_REGIONAL |
42222222 | Visa | GB | Consumer Debit | DOMESTIC |
51000000 | Mastercard | DE | Consumer Debit | INTRA_EEA |
52222222 | Mastercard | FR | Commercial Credit | INTRA_EEA |
53635423 | Mastercard | DE | Consumer Debit | INTRA_EEA |
55555555 | Mastercard | US | Consumer Credit | INTER_REGIONAL |
Verification Checklist
Before going live, verify in sandbox:
| # | Test | Expected |
|---|---|---|
| 1 | Request with valid token | 200 |
| 2 | Request without token | 401 |
| 3 | Request with expired token | 401 |
| 4 | Missing txn_id | 422 |
| 5 | Invalid mcc (e.g. "12") | 422 |
| 6 | Valid request | Response includes scheme_fees and interchange |
| 7 | Verify totals | total_fees_by_currency = scheme + interchange + fixed |
| 8 | mode: "scheme" | interchange is null |
| 9 | mode: "interchange" | scheme_fees is null |
| 10 | GET /health | 200 |
| 11 | Invalid BIN | 400 |
| 12 | Same txn_id twice | Both return 200 (idempotent) |
