API Integration Overview
The Credit Key API provides everything you need to build a fully customized Credit Key checkout experience.
Unlike supported platform integrations, a direct API integration gives you complete control over the checkout experience while allowing customers to complete financing using Credit Key's hosted checkout.
This guide introduces the core components of the API integration and explains the recommended implementation sequence.
Before You Begin
Before integrating with the Credit Key API, ensure you have:
- A Credit Key merchant account
- API credentials
- Access to the Credit Key sandbox environment
- Familiarity with your application's checkout flow
If you're evaluating different integration options, return to the Checkout Overview to compare all supported Checkout Flow implementations.
API Integration Architecture
Every Credit Key API integration follows the same high-level architecture.
Merchant Checkout
│
▼
Authenticate
│
▼
Create Hosted Checkout Session
│
▼
Receive checkout_url
│
▼
Redirect Customer
│
▼
Hosted Checkout
│
▼
Customer Returns
(with CKKEY)
│
▼
Authorize Order
│
▼
Capture PaymentAlthough your application controls the checkout experience, Credit Key manages:
- Customer authentication
- Financing applications
- Credit decisions
- Customer account management
- Financing and repayment
Your application remains responsible for:
- Creating checkout sessions
- Redirecting customers
- Managing orders
- Capturing payments
- Processing refunds
- Receiving webhook notifications
Core API Components
A successful Credit Key integration consists of three core components.
Authentication
Authenticate with the Credit Key API using your merchant credentials to obtain a bearer token.
Every API request requires authentication.
Learn more:
Hosted Checkout
Create a Hosted Checkout session by sending the customer's order information to Credit Key.
Credit Key returns a checkout_url that your application redirects the customer to.
Hosted Checkout manages:
- Customer login
- New customer applications
- Credit decisions
- Financing acceptance
Learn more:
Post-Checkout Operations
After the customer completes Hosted Checkout, Credit Key redirects them back to your application with a CKKEY.
The CKKEY uniquely identifies the Credit Key order and is required for all subsequent order operations.
Typical post-checkout operations include:
- Authorize an order
- Update an order
- Capture payment
- Refund payment
- Cancel an order
Learn more:
Recommended Implementation Order
We recommend implementing your API integration one milestone at a time.
- Authenticate with the API.
- Create a Hosted Checkout session.
- Verify the checkout experience.
- Handle the customer return and store the
CKKEY. - Authorize the order.
- Capture payment.
- Implement webhook handling.
- Add refunds.
- Add partial capture (if needed).
- Configure settlements (if applicable).
Building and validating each milestone independently makes troubleshooting significantly easier.
Advanced Features
Once your core checkout integration is complete, you can extend your implementation with additional functionality.
- Partial Capture
- Webhooks
- Settlements
These features are optional and can be implemented independently.
Testing Your Integration
Before moving to production, thoroughly test each stage of your integration using the Credit Key sandbox.
We recommend validating:
- Authentication
- Hosted Checkout
- Customer redirects
- CKKEY handling
- Order authorization
- Payment capture
- Refunds
- Partial captures
- Webhooks
See the Testing Credit Key Checkout guide.
What's Next
You're now ready to begin building your Credit Key API integration.
The first step is to authenticate your application with the Credit Key API and obtain a bearer token, which is required for all subsequent API requests.
Continue to Authentication to get started.
Updated about 5 hours ago
