Custom Integrations

Merchant API Overview


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.

Feel free to reach out to Credit Key Support via email or call (844) 334-3636 with any 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

Initiate checkout 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 payload will include everything Credit Key needs to start the checkout application flow.

The begin_checkout payload contains all order information used to begin the checkout flow.

📘

Return URL

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

Your 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 of your choice. 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 your 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 your system used to refer to the user's checkout session. This way you will easily be able to line up the Credit Key order with the user's shopping cart session. However, if you track checkout sessions with cookies, a general URL might work in your scenario.

📘

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, you can simply provide the URL to your checkout page for the Cancel URL. But if you want to take another action besides going back to the checkout page, or perform tracking, you can redirect 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, you should return an error and you should not continue placing the order.

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 your 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, you can call cancel_order to cancel the payment.

Refunds


/refund
Expected payload and response

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

Authorize and Capture


Your e-commerce system 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.