Appearance
Utilizing the Polaris Hosted Checkout Page
The Polaris Checkout Page enables seamless integration of payment processing for your web shop. This process involves several interactions between your web shop and the Polaris system. Below, we explain how the Polaris Checkout Page works and outline the steps required for a successful integration.
Flow Overview
When a customer shops on your web store, they add products to their cart and proceed to checkout. At this point, the web shop sends a request to Polaris and receives a link to the hosted checkout page, where the customer is redirected to complete the payment. Once the payment is finalized on the Polaris Checkout Page, the customer is redirected back to the specified URL on the web shop. All transaction details are then sent to both the web shop's callback URL and the Polaris backend.
Steps in the Checkout Flow
Checkout Trigger:
The checkout process starts when the customer adds items to their cart and clicks the "Checkout" button on your web shop.Request to Polaris:
At this stage, your web shop sends a request to the Polaris/purchases
endpoint, containing relevant transaction details, including at least theamount
, thechannel_id
, your API Key, and your own merchant transaction ID. The API key andchannel_id
can be found on your Channel Detail Page. Optionally, the request can also include URLs for redirecting the customer afterward and for receiving transaction notifications. These URLs are mandatory during channel setup but can be overridden when generating the hosted checkout page link. Ifpayment_method
is provided, the user is directed to the chosen payment method. Otherwise, the user can select from all payment methods defined in the corresponding channel. If you are providing apayment_method
, make sure that it is correctly set up in the specified channel.
The reference for this API request can be found at Create and process new purchase.
Polaris Checkout Page:
The customer is redirected to the Polaris-hosted Checkout Page, where they can review the final amount and select a payment method from those defined in the Channel Setup. At least one payment method must be configured. Polaris then securely handles the transaction, utilizing the connectors set up in your account (e.g., PayPal, Adyen).Payment Completion:
Once the payment is completed, Polaris redirects the customer to one of the success or failure URLs provided in the initial request or defined in the Channel setup:url_return_success
: after completing the purchase successfullyurl_return_cancel
: after the user cancels the purchaseurl_return_failure
: after a failed attempt to complete the purchase
Transaction Confirmation:
Polaris sends the transaction status to your specified callback URL (url_callback
), indicating whether the payment was successful or not. The response includes details such as:- Session information: Identifier and status of the transaction (e.g., SUCCESS, FAILURE)
- Channel information: ID of the associated path to the channel (Client ID, Division ID, Merchant ID, Channel ID). This is the same path you provided when you made the request to optain the link to the hosted checkout page.
- Merchant Transaction ID: Your assigned transaction ID
- User data: Data of the end user the payment was processed for
- Confirmed shipping address: The address where the order should be shipped (optional)
- Debit information: The requested and billed amounts, etc.
Payment Flow Diagram
This diagram illustrates the key steps involved in processing payments through the Polaris Hosted Checkout Page, from initiating the checkout to final transaction confirmation.
For a full list of parameters, see the API documentation: Purchase Callback.