How it works
The checkout process, including what the customer sees and doesn't see, has six stages:
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.
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_signaturevalue and presents its own hosted payments page to the customer (see Signing Mechanism).
The customer pays for the order on the hosted payment page that you provide.
Customers that complete the payment flow should be redirected back to
x_url_completewith 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
It is best practice for your payment gateway to also POST a callback asynchronously to
x_url_callbackwith 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.
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.