Order Management
Capture an order

Capture an order

When the goods the customer purchased are getting delivered, an API call to the /order endpoint is required to tell Avarda about the items delivered to the customer so they can be charged. This process is often referred to as capturing or activating an order.

API endpoint

POST: {api_url}/api/partner/payments/{purchaseid}/order
Authorization: Bearer {partner_access_token}

Example of request body

{
  "TranId": "DD9ACDB9DE28424083BA",
  "OrderReference": "4000124352",
  "TrackingCode": "",
  "Items": [
    {
      "Description": "Carrey-hybriditakki, naisten, punai",
      "Notes": "HH854765",
      "Amount": 20.97,
      "TaxCode": "24.0000",
      "TaxAmount": 4.06,
      "Quantity": 2
    },
    {
      "Description": "Lester-matkakassi, sininen",
      "Notes": "HH1001863",
      "Amount": 29.97,
      "TaxCode": "24.0000",
      "TaxAmount": 5.8,
      "Quantity": 2
    },
    {
      "Description": "Discount",
      "Notes": "HH1001863",
      "Amount": -2.97,
      "TaxCode": "24.0000",
      "TaxAmount": -0.41,
      "Quantity": 2
    }
  ]
}

The items submitted in the call will be enlisted on the invoice as individual invoice lines. Items with both positive and negative (rebates) values are supported as long the total amount is positive. The Reseller order ID passed in a request will be used to identify the transaction.

NameData TypeDefault valueDescriptionRequired
ItemsCollection of ItemNoneA list of items representing the individual rows on an invoice.True
OrderReferencestring (max length: 20 characters)An empty stringAn ID that identifies the order for which the purchase is to be madeTrue
TranIdstring (max length: 36 characters)An empty stringA random unique ID generated by the calling party identifies the HTTP request. Although the property is not strictly required, we recommend generating a new random GUID and passing it.False
TrackingCodestringAn empty stringGenerated code by the delivery companyFalse
PosIdstring (max length: 32 characters)An empty stringPOS ID is the device number. It is visible on every printout from the POS terminal in the left top corner of the receipt below your contact details or on a sticker on the POS terminal.False

Return Value

If successful, the method returns a HTTP status code 204 (OK with no content).