Ingrid adapter

Overview

Note

This documentation is currently being worked on, update coming shortly.

The Ingrid adapter integrates Ingrid Delivery Checkout with Norce Checkout. Changes made in Norce Checkout are synced with Ingrid and vise versa.

Configuration

Add your configuration for the Ingrid adapter in the Norce Checkout Admin.

Create Shipping

To get an Ingrid Checkout Session with HTML snippet you create a shipping using the Ingrid Adapter.

Copy
Copied
POST /api/checkout/v1/orders/{order_id}/shippings

The Ingrid adapter will fetch the order, map it and create the session. Finally providing you with a result containing the Norce shipping id, the Ingrid Checkout Session id as well as the snippet.

Copy
Copied
{
    "shippingId": "sGMVlgVNMjCDxsdJaOwmklGEpjM",
    "htmlSnippet": "<div id=\"shipwallet-container\" style=\"min-height:350px\">...</div>",
    "sessionId": "VM2-a1bc234...",
    "useAddressForm": true
}

The adapter will register any hooks and notifications required to keep track of changes to the order, so you will not need to inform it of changes made to the order by other adapters.

Client Side Callbacks

Ingrid will not inform the adapter directly of any changes made through the Ingrid Delivery Checkout snippet. In order to keep the Norce order up to date it is vital that you subscribe to user events. For changes made to delivery/shipping you'll need to call the Shipping Changed endpoint. For changes made to the address you'll need to call the Customer Changed endpoint.

You'll find documentation about user events in Ingrid Developer Documentation.

Completing the Session

As you complete your order, usually driven by a payment adapter, the Ingrid adapter will react and attempt to complete the Delivery Checkout Session accordingly. If successful the shipping and if it was available directly the shipping will now contain the tos_id under the tmsReference.

Copyright © Norce 2024. All right reserved.