Test mode
Use a dedicated development API key for local work. Production dashboard keys are prefixed withcrv_live_; Crave-provisioned test environments issue keys prefixed with crv_test_.
Generate a test API key from Crave Dashboard > Developers > API Development > Step 1 - API Keys. If your organization does not have a test merchant or
crv_test_... key available, ask the Crave team to provision one before testing order placement.
Test Stripe payments
In test mode, Crave automatically uses Stripe’s test environment. Use Stripe’s test card numbers:
Use any future expiry date and any 3-digit CVC.
Unit testing the SDK
The SDK accepts a customfetch implementation, making it easy to mock API responses in tests:
Test error handling
Verify your app handles API errors correctly:Integration testing
For integration tests against the real API, use your test API key and clean up after each test:Testing webhook handlers
Send mock webhook payloads to your local handler:Next steps
Error Codes
Handle every error the API can return.
Deployment
Deploy your storefront to production.