Standalone Checkout

Introduction

The Standalone Checkout is available for customers who are not using the imin Events API and are instead processing open data directly.

circle-exclamation
circle-exclamation

Request

All bookablearrow-up-right opportunities available in open data have an id .

The id from a ScheduledSession within the open data is to be supplied as the id contained within imin:initialOrder.orderedItem.orderedItem in the initial request, along with the information contained within the following JSON:

PUT /checkout-sessions HTTP/1.1
Host: checkout.example.com
Date: Mon, 8 Oct 2018 20:52:35 GMT
Accept: application/json

POST /checkout-sessions
{
  "@context": ["https://openactive.io/", "https://imin.co/"],
  "type": "imin:CheckoutSession",
  "imin:initialOrder": {
    "type": "OrderQuote",
    "orderedItem": [
      {
        "type": "OrderItem",
        "orderedItem": {
          "type": "ScheduledSession",
          "id": "https://opendata.fusion-lifestyle.com/OpenActive/api/scheduled-sessions/310003324"
        }
      }
    ]
  }
}

Response

circle-info

The response will reflect back the request, but will additionally contain a potentialAction with a target URL. The data consumer uses .potentialAction[0].targetas the URL of the "book" button for this opportunity.

If the bookablearrow-up-right opportunity provided is available for you to book within the imin platform, the response JSON will include the URL for the Checkout:

If the opportunity is not available for you to book within the imin platform, the following response will be returned:

Last updated