Hosted Checkout API

Hosted Checkout API

The Credit Key checkout process begins when the customer selects Credit Key at checkout. The steps below represent what the customer experiences on the front end, and how the Credit Key integration handles the checkout on the back end.

Please contact Credit Key Support via email or call (844) 334-3636 with questions. We're here to help!

Check to see if Credit Key is Available


/is_displayed_in_checkout

Determine if Credit Key is available and if the Credit Key payment method should be displayed on the checkout page. The expected response is a true or false value. When false, Credit Key should not be displayed.

Begin Checkout


/begin_checkout
Expected payload and response

Checkout can be initiated using Credit Key as the payment method with begin_checkout.

This method requires the following parameters to start the application flow and complete the checkout process.
Order information is sent to Credit Key to begin the checkout process. The begin_checkout payload should contain all order and application datqa used to begin the checkout flow.

📘

Return URL

Example: https://www.merchantsite.com/return/after/checkout?id=%CKKEY%

The Return URL should include the percent delimited CKKEY value as shown above. The example key in the query string above(currently "id") can be any value. Upon completion of an order, Credit Key will replace the CKKEY value and the delimiters with the new Credit Key order ID.

Example of update Return URL: https://www.merchantsite.com/return/after/checkout?id=CK-12345

This CK Order ID value should be persisted in the merchant's system for future updates to this order.

When a customer has successfully placed an order with Credit Key, they will be redirected back to the supplied Return URL.

We recommend creating a session-specific URL for each request that contains identifying information about the session, such as the primary key in the e-commerce system used to refer to the user's checkout session. By doing so, merchants can easily line up Credit Key orders with the user's shopping cart session. However, if you track checkout sessions with cookies, a general URL will work.

📘

Cancel URL

Credit Key will redirect users to the Cancel URL when checkout was not completed successfully - such as when the user canceled the Credit Key checkout session, or if the user was not able to be approved for a loan. In many cases, simply provide the URL to the checkout page for the Cancel URL. If another action is to occur besides going back to the checkout page, or performing tracking, a user can be redirected elsewhere.

Complete Checkout


/complete_checkout
Expected payload and response

Validates that the payment authorization was successful and that the order should be placed in the merchant system.

After the user is redirected back to the merchant site from Credit Key, complete_checkout should be called and the CK Order ID(CKKEY) should be sent to the Credit Key API to confirm the successful placement of an order. If the return value for 'success' is 'true', the order should be placed in the merchant system; otherwise, no order should be placed. If false is returned, or an error/exception is thrown, do not proceed with order placement.

Updating Orders


/update_order
Expected payload and response

Any changes to shopping cart contents and prices that occur before capture should be sent via update_order.

Call update_order to provide Credit Key with your local merchant Order ID and Order Status.

Shipping Orders


/confirm_order
Expected payload and response

Signal to Credit Key that the order has been shipped. This should normally coincide with the "capture" event of the e-commerce system. See the Authorize and Capture section of the Credit Key Implementation Guide for details.

❗️

Merchant Order ID is required!

A merchant order ID must be sent to the Credit Key Merchant API for orders to be shipped.

Order amounts cannot be changed in this request. Any amount changes should be made using update_order prior to shipment.

Expected payload and response

Canceling Orders


/cancel_order
Expected payload and response

If the order is canceled before shipment, cancel_order can be used to cancel the order.

Refunds


/refund
Expected payload and response

To issue a full or partial refund, use the refund endpoint.

Making API calls

To make a call to any of the Credit Key APIs, the URL associated with the environment must be included.

Staging: https://staging.creditkey.com/
Production: https://www.creditkey.com/

IP addresses must be whitelisted to allow access to the Credit Key API. This helps to prevent unauthorized networks from performing actions on behalf of merchants and applicants.

Retrieve your API keys
Staging API keys are available in the staging merchant portal.
Production API keys are available in the production merchant portal.

Security
Your Public Key is not private. It is used to identify the associated account with Credit Key. It can safely be published in merchant documentation and used in code snippets. The Shared Secret should be kept confidential. The account’s shared secret can be used to perform requests to the Credit Key API.

Authorize and Capture


Systems should not be configured to auto-capture Credit Key orders. Rather, orders should be authorized at first, and captured upon shipment. Your capture code can then call confirm_order upon Capture. Any changes to shopping cart contents and prices that occur before capture should be sent via update_order.

ERP or Backend Checkouts


/begin_standalone_checkout
ERP Platform Integrations Documentation

The Credit Key standalone checkout feature allows merchants to initiate a payment process outside of a conventional e-commerce checkout experience. When Credit Key is selected as the payment method in your ERP system, an email notification is sent to the customer. The email will contain a link that will redirect the customer to a checkout experience hosted on creditkey.com to complete the payment process.


Questions? Contact Credit Key Support