GuidesAPI Reference
API Reference

Development and Testing

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.

EnvironmentBase URLPurpose
Sandboxhttps://api.staging.creditkey.comDevelopment and testing
Productionhttps://api.creditkey.comLive 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.

ScenarioDescriptionDocumentation
AuthenticationObtain an access token and make a successful authenticated API request.Making API Calls
Hosted CheckoutCreate a Hosted Checkout session and verify the customer is redirected to the Credit Key checkout experience.Hosted Checkout
Hosted ApplicationGenerate a Hosted Application URL and verify the customer can complete a financing application.Hosted Application
Order AuthorizationAuthorize an order and verify the order status is returned successfully.Post-Checkout Operations
Order UpdateUpdate an authorized order before capture.Post-Checkout Operations
Full CaptureCapture the full authorized amount.Post-Checkout Operations
Partial CaptureCapture a portion of the authorized amount and verify the remaining balance.Partial Capture
RefundIssue a refund after capture and verify the response.Post-Checkout Operations
Order CancellationCancel an authorized order before capture.Post-Checkout Operations
WebhooksVerify your application receives and processes webhook events correctly.Webhooks
Error HandlingVerify 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