Order Update API

Keep seQura and your systems in sync to provide excellent service. For example: when an order ships, inform seQura about the unshipped and shipped carts. For partial returns, update the shipped cart. For cancellations, indicate both carts are empty.

seQura provides a web interface for updating orders, but you can also integrate with the Order Updates API to avoid updating both systems manually. This document describes the API.

Sending updates

The endpoint for the order updates is https://sandbox.sequrapi.com/merchants/ merchant-ref/orders/order-ref where merchant-ref is your merchant reference or ID and order-ref is the reference that was sent as merchant_reference.order_ref_1 during checkout.

E.g., with merchant-ref being camisasonline and order-ref being A14/12345, the URL will be https://sandbox.sequrapi.com/merchants/camisasonline/orders/A14%2F12345 .
(Note that the slash (/) has to be escaped in the URL.)

Shipping scenarios

When the purchase is fully shipped

The most common case is when the shop ships the purchase. To manage this, the payload must contain an empty unshipped_cart and the shipped_cart containing all the purchased items.

{
  "order": {
    "unshipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 0,
      "items": []
    },
    "shipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 8350,
      "items":
        [
          {
            "reference": "shirt1234",
            "name": "shirt",
            "price_with_tax": 1250,
            "quantity": 1,
            "total_with_tax": 1250,
            "downloadable": false
          },
          {
            "reference": "jacket9876",
            "name": "jacket",
            "price_with_tax": 7100,
            "quantity": 1,
            "total_with_tax": 7100,
            "downloadable": false
          }
        ]
    },
    ...
  }
}

When the purchase is partially shipped

For multiple shipments, keep unshipped items in unshipped_cart until shipped. Only include shipped items in shipped_cart.

{
  "order": {
    "unshipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 1250,
      "items":
        [
          {
            "reference": "shirt1234",
            "name": "shirt",
            "price_with_tax": 1250,
            "quantity": 1,
            "total_with_tax": 1250,
            "downloadable": false
          },
        ]
    },
    "shipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 7100,
      "items":
        [
          {
            "reference": "jacket9876",
            "name": "jacket",
            "price_with_tax": 7100,
            "quantity": 1,
            "total_with_tax": 7100,
            "downloadable": false
          }
        ]
    },
    ...
  }
}

When there is a partial return

Send the current cart state. If nothing is pending shipment, unshipped_cart is empty. Non-returned items stay in shipped_cart.

{
  "order": {
    "unshipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 0,
      "items": []
    },
    "shipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 7100,
      "items":
        [
          {
            "reference": "jacket9876",
            "name": "jacket",
            "price_with_tax": 7100,
            "quantity": 1,
            "total_with_tax": 7100,
            "downloadable": false
          }
        ]
    },
    ...
  }
}

When there is a full return or order cancellation

Both carts are empty. For cancellations (never shipped), also include the cancellation_reason field.

{
  "order": {
    "unshipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 0,
      "items": []
    },
    "shipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 0,
      "items": []
    },
    "cancellation_reason": "out_of_stock",
    ...
  }
}

When there is a cart update

If the shopper changes any item, send the new cart content.

{
  "order": {
    "unshipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 0,
      "items": []
    },
    "shipped_cart": {
      "currency": "EUR",
      "order_total_with_tax": 8350,
      "items":
        [
          {
            "reference": "shirt_XL",
            "name": "shirt XL",
            "price_with_tax": 1250,
            "quantity": 1,
            "total_with_tax": 1250,
            "downloadable": false
          },
          {
            "reference": "jacket9876",
            "name": "jacket",
            "price_with_tax": 7100,
            "quantity": 1,
            "total_with_tax": 7100,
            "downloadable": false
          }
        ]
    },
    ...
  }
}

Order upsellings

seQura doesn't accept order upsellings with an initial price increase greater than 15%.

Shipping items in checkout

If your store is physical (shoppers take purchases immediately) or you don't ship items (online courses, ebooks, downloadable content), you can indicate this during checkout. Read more

Order Update API Payload and Examples

Full payload structure description with JSON and PHP examples. Read more

Calling the Order Update API

Sample API calls. Read more

When am I done?

Your requests return an HTTP response code and JSON body.

  • 200, 202, or 204: Update processed. Log in to our back office and verify the changes are correct.
  • 409 or other errors: Handle them appropriately.