Before integrating with the Credit Key API, you'll need to configure your development environment, obtain API credentials, and validate your implementation in the sandbox.
This guide covers everything you need to begin development and prepare for production.
Development
Use the Sandbox environment while building and validating your Credit Key integration.
API Environments
Credit Key provides separate environments for development and production.
| Environment | Base URL | Purpose |
|---|---|---|
| Sandbox | https://api.staging.creditkey.com | Development and testing |
| Production | https://api.creditkey.com | Live transactions |
Use the Sandbox base URL until your integration has completed the recommended testing scenarios.
API Credentials
Credit Key API requests require environment-specific credentials.
Retrieve and manage your API credentials through the Credit Key Merchant Portal.
See API Keys for instructions on accessing your credentials and managing API keys.
Sandbox credentials cannot be used with the Production API, and Production credentials cannot be used with the Sandbox API.
Making API Calls
Use your Client ID and Client Secret to obtain an access token, then include the token in the Authorization header of protected API requests.
See Making API Calls for authentication instructions, required headers, and example requests.
Development Checklist
Before beginning implementation, confirm that you have:
| Task | |
|---|---|
| ☐ | Access to the Credit Key Merchant Portal |
| ☐ | Retrieved your Sandbox API credentials |
| ☐ | Configured the Sandbox API base URL |
| ☐ | Successfully obtained an access token |
| ☐ | Completed an authenticated API request |
After completing these steps, continue to the Testing section to validate your integration.
Testing
After configuring your Sandbox environment, validate your integration by testing the following scenarios.
| Scenario | Description | Documentation |
|---|---|---|
| Authentication | Obtain an access token and make a successful authenticated API request. | Making API Calls |
| Hosted Checkout | Create a Hosted Checkout session and verify the customer is redirected to the Credit Key checkout experience. | Hosted Checkout |
| Hosted Application | Generate a Hosted Application URL and verify the customer can complete a financing application. | Hosted Application |
| Order Authorization | Authorize an order and verify the order status is returned successfully. | Post-Checkout Operations |
| Order Update | Update an authorized order before capture. | Post-Checkout Operations |
| Full Capture | Capture the full authorized amount. | Post-Checkout Operations |
| Partial Capture | Capture a portion of the authorized amount and verify the remaining balance. | Partial Capture |
| Refund | Issue a refund after capture and verify the response. | Post-Checkout Operations |
| Order Cancellation | Cancel an authorized order before capture. | Post-Checkout Operations |
| Webhooks | Verify your application receives and processes webhook events correctly. | Webhooks |
| Error Handling | Verify your application handles invalid requests, authentication failures, and API validation errors gracefully. | API Reference |
Production Readiness Checklist
Before requesting Production credentials, confirm that you've completed the following:
| Task | |
|---|---|
| ☐ | Generated Sandbox API credentials |
| ☐ | Successfully authenticated with the Sandbox API |
| ☐ | Completed the Hosted Checkout or Hosted Application flow |
| ☐ | Verified all required order management operations |
| ☐ | Successfully processed webhook events |
| ☐ | Tested common error scenarios |
| ☐ | Updated your application to use the Production API endpoint |
| ☐ | Generated Production API credentials |
| ☐ | Completed an end-to-end production validation |
