Skip to main content

Overview

The Cred Protocol sandbox provides mock API endpoints for development and testing. Use the sandbox to build and test your integration without consuming your API quota or waiting for real blockchain queries.

Why Use the Sandbox?

Free Testing

Sandbox requests don’t count against your API quota

Instant Responses

No blockchain queries means instant responses

Consistent Data

Deterministic responses for reliable testing

No Dependencies

Test without relying on blockchain data availability

Sandbox Endpoints

Getting Started

1. Use Sandbox During Development

Simply add /sandbox before the endpoint path:

2. Sandbox Response Format

Sandbox responses use the same format as production:
Sandbox responses are deterministic - the same address always returns the same mock score. This makes testing reliable and reproducible.

Test Scenarios

Testing Different Score Ranges

Use these test addresses to simulate different credit scores:

Testing Your UI

Use the sandbox to test how your UI handles different scenarios:

CI/CD Integration

Automated Testing

Use the sandbox in your test suite for consistent, fast tests:

GitHub Actions Example

Best Practices

Configure your application to automatically use sandbox in development:
Add a check to ensure you’re using the correct endpoint in production:
The sandbox returns consistent error responses too:
  • Invalid addresses return 400 errors
  • Missing auth returns 401 errors
  • Use these to test your error handling
Never hardcode /sandbox/ in production code:

Transitioning to Production

When you’re ready to go live:
1

Review Your Integration

Ensure all features work correctly with sandbox data
2

Update Configuration

Set your environment to production mode
3

Test with Production

Make a few test requests to verify production access
4

Monitor Usage

Check your Dashboard to ensure requests are being tracked correctly