Follow our best practices to make your integration robust, fast and secure.
When the customer reaches the checkout page, the merchant loads the html snippet provided in the response of the Create Order request, which will then create the checkout iframe.
Merchant creates a KCO Order (session) and needs to know the best practices associated with a new order and an existing order.
For a new order,
For an existing order,
When the customer closes down the browser or goes back to the steps before the checkout page (eg: product page, landing page) and later comes back to the checkout page to complete the order.
When the customer has completed shopping and the checkout page is rendered for the first time, a session variable should be used to store the KCO Order Location URI returned from the initial POST creating the order.
NOTE: This is NOT the snippet, it is the URL for the order
When the customer re-enters the checkout:
After the checkout page is rendered, the customer may change shipping options, enter promo codes, or remove line items or update item quantity from the merchant panel. Anytime this occurs, the KCO widget will not reflect these changes and will need to be refreshed. This is done by suspending and resuming the checkout frame.
Used while the checkout page is rendered and the user modifies the cart within the merchant order summary panel.
The merchant has not collected the billing or shipping address and is reliant on KCO to provide the shipping address. When the address is supplied in the KCO, it will default the shipping address to this address. Anytime the address changes, the tax or shipping may need to be recomputed by the merchant.
Receiving the address update from KCO,
Updating the order
As the shipping address is known now,
The checkout page contains:
With the checkout page rendered, the user may change shipping options, enter promo codes, or remove line items or update item quantity from the merchant panel. Anytime this occurs, the KCO panel will not reflect these changes and will need to be refreshed. This is done by suspending and resuming the checkout process.
User may change shipping address or select a different shipping option or add a discount
Once the checkout has completed at KCO the merchant may want to validate the order items are in stock, or confirm the order items in the cart are the same as what KCO shows.
If no validate URL is assigned to the merchant_urls the order is updated in KCO (KCO) with a status of ‘checkout_complete’. No other changes may be made to the order through the Checkout API’s. Afterwards, changes may only be made through KCO Order Management API.
Validate – Must complete within 3 seconds else the order is created.
If a ‘validation’ URL (MUST BE SSL ADDRESS) is assigned in the collection of merchant_url’s, then KCO will perform a POST request to this URL. The entire order is passed back here. The status will still be ‘checkout_incomplete’ so changes may still be made. Typical issues:
Validate OK – Or not completed within 3 seconds
If the validation is not performed within 3 seconds it is considered valid and the confirmation redirect will occur.
Validate Not OK
Once the queued order moves to KCO’s Order Management a POST is made to the ‘push’ URL provided in the list of merchant_url’s. This occurs every 4 hours for 48 hours or until it’s acknowledged. The Merchant should have a process that can ‘Acknowledge’ this in Order Management.
If the order isn’t created in the merchant’s system. It should be done here. Once created the internal merchant order id should be updated to the MerchantReference1 field for the order in KCOs order management system. If the order for any reason can’t be created in the merchant’s system the order should be canceled with KCO using the Order Management API.
Acknowledge – through Order Management API
Once the order has been pushed to Order Management it should be ‘Acknowledged’ by the merchant.
Example if address is limited to X characters:
and if found split to address line 2.
Name length may be limited on your end.
Apply a phone number rule. It appears that phone numbers with +1 are being failed for some merchants.
Merchants should support the E.164 number formatting for all phone numbers both in the ‘to’ and ‘from’ fields. This format is the internationally-standardized format for all phone numbers, and it includes all the relevant information to route calls and SMS messages globally. E.164 numbers can have a maximum of fifteen digits and are usually written as follows: [+][country code][subscriber number including area code].
Apply a zip code rule as well that will support both 5 digit zips as well as 5-4 digit zips for the US.