📍 Bolt / Developers / SDKs / iOS / Post-Checkout Customization

Post-Checkout Customization

Once you’ve successfully set up the Bolt iOS SDK and payment provider, you can customize your post-checkout experiences.

Default Exit Checkout

Bolt Checkout in the webview offers an Exit Checkout button seen throughout the checkout process. Once clicked, the onCheckoutClose event is fired. When this happens, the webview is closed, returning the user to the page with the checkout and apple pay button.

Merchants can pass a callback function to take place immediately after this, especially if they want to track analytics, redirect users to different screens in their app, or other shopper workflow use cases.

Default Successful Checkout

Once the transaction is successful, the onCheckoutSuccess event is fired. Then, by default, the shopper is taken to the Bolt confirmation page.

Remember, to include the Bolt Checkout button, you must state .withCheckoutButton() when configuring the Bolt View Controller. This function has two optional parameters, one being called delegate. To pass the onCheckoutSuccess and onCheckoutClose callback, you must pass in an object which conforms to the BoltCheckoutButtonDelegate protocol for the delegate parameter.

If a merchant would like to show their own confirmation page, place the following code within a callback function that can be passed to Bolt. This way, the merchant will also receive access to the order reference code which can be displayed on the merchant confirmation page.

let boltVC = Bolt()
  // ...
  // ...
  .withCheckoutButton(delegate: self)
extension ExampleCheckoutViewController: BoltCheckoutButtonDelegate {
  func onCheckoutSuccess(didRecieve orderReference: String) {
   print("bolt checkout on success")
  func onCheckoutClose() {
   print("bolt checkout on close")

Show Merchant Confirmation Page Upon Success

If the merchant would like the Checkout Webview to close upon a successful transaction instead (so the merchant can then show their own confirmation page), you must state this when creating the Bolt View Controller:

Let boltVC = Bolt()
  // ...
  // ...

By default, .withNoConfirmationPage() is set to true.

Next Steps

Be sure to thoroughly test your customizations before launching to your iOS application! Please reach out to your Bolt representative if you have any questions or feedback.


How did we do?

📖On This Page