Hakuna Redirect on the e-commerce order confirmation page

Context

With this solution, you can give your e-commerce customers the opportunity to purchase product protection for all protectable products in their orders by redirecting them from the order confirmation page to individual Hakuna-hosted checkouts.

1. Share order placement event

When an order is placed in your system, you will need to publish an order placement event by calling our events endpoint and passing us order, customer, and product information.

As a response, you'll receive the generated event ID.

Example response
{
  "event_id": "evt-7c1784a1-d96b-4ec6-b515-8dc4a5433cbe"
}

2. Get information about available protection

To find out which products have protection plans available and to get information about them, call our checkouts endpoint and pass us the order ID in an HTTP GET request. GET /checkouts?order_id=order-123&checkout_type=redirect

Example response
{
  "order_id": "ord-123",
  "redirect_link": "https://checkout.hellohakuna.com/X2Y45347GXai",
  "available_plans": [
    {
      "line_item_id": "li-1",
      "product_reference": "prd-123",
      "plan_price_amount": 4999,
      "plan_price_currency": "eur"
    },
    {
      "line_item_id": "li-2",
      "product_reference": "prd-321",
      "plan_price_amount": 8999,
      "plan_price_currency": "eur"
    }
  ]
}

The response contains a checkout link which is uniquely generated for each order.

If a line item is not listed in the response, then there is no plan available for that product. If there are no plans available for any of the products in the order, then you will get a 404 error response.

3. Use the information

Use the information to build a CTA on the order confirmation page.

Last updated