How it works

The checkout process, including what the customer sees and doesn't see, has six stages:

A flowchart of the checkout process

  1. The customer places an order with Shopify Checkout. They enter their email, shipping address and delivery method, and then select your gateway as their payment option.

  2. On the last step of Shopify Checkout the customer is redirected to your gateway's URL using a POST request along with Request Values. Your gateway verifies the x_signature value and presents its own hosted payments page to the customer (see Signing Mechanism).

  3. The customer pays for the order on the hosted payment page that you provide.

  4. Customers that complete the payment flow should be redirected back to x_url_complete with all required Response Values as query parameters, including x_signature (see Signing Mechanism). Visitors that exit the payment flow before successfully completing it need to be redirected back to x_url_cancel.

  5. It is best practice for your payment gateway to also POST a callback asynchronously to x_url_callback with the same Response Values. This ensures that orders can be completed even in cases where the customer's connection to Shopify is terminated prematurely. Callbacks must be in HTTP POST x-www-form-urlencoded format.

  6. The order is complete, and a thank-you page is shown to customer:

    • HTTP 200 indicates successful receipt of a callback by Shopify. Otherwise up to 5 retries with an interval of at least 60 seconds are recommended.
    • Duplicate requests are ignored by Shopify.

Continue to the getting started guide to begin making use of the Hosted Payment SDK.

Sign up for a Partner account to get started.

Sign up