The Vend Developer Hub

Welcome to the Vend developer hub. You'll find comprehensive guides and documentation to help you start working with the Vend API as quickly as possible.

Reference

Usage:

This endpoint can be used to open a sale, previously created via the REST API, in one of Vend POS client apps: Register for iPad, Register for Mac & PC & Sell Screen (deprecated), The integrating application may depending on the intended use case, use the URL specified below to open the Vend web application or use the iOS deep linking to open it directly inside the native iOS application.

URL:

https://{domain_prefix}.vendhq.com/redirect/1.0/sales/{id}

Optional parameters:

  • platform= {web/ios} - if not supplied it defaults to web.
  • action - which may take one the following values:
    • pay - this will cause the client app to open directly in the payment dialogue,
    • view - this will open the sale in the sale history instead of the sell screen.
  • close_after_complete - if supplied with value true it will cause the tab to close when processing of the sale is completed,
  • callback_url={url} - [only supported for platform=ios] allows the integrator to specify an URL (deep link) for the application which the request originated from. If you specify a callback_url, the body will contain:
{
    "success": true,
    "sale_status": "{sale_status}"
}

Example workflow

  1. Create a sale in Vend via the REST API as described in Vend API documentation.
  2. Based on the sale id from the response in the previous step open the sale in your app using the link above.
  3. The cashier will complete the sale and, depending on the platform, one of 2 things will happen:

  4. ios - if the callback_url is specified the application will attempt to open that URL and pass the sale status payload,

  5. web - the window object will emit a postMessage event in 1 of 2 forms:

    • for the new Register app:
    {
      "eventName": "sale:complete",
      "data": {
        "sale": {
          "id": "<sale id or localId>",
          "status": "<sale status>"
        }
      }
    }
    
    • for the Sell Screen:
    {
     "event": "vend.register_sale.complete",
     "id": "xxx-xxx-xxx-xxx"
    }