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
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.
Name | Data Type | Default value | Description | Required |
---|---|---|---|---|
Items | Collection of Item | None | A list of items representing the individual rows on an invoice. | True |
OrderReference | string (max length: 20 characters) | An empty string | An ID that identifies the order for which the purchase is to be made | True |
TranId | string (max length: 36 characters) | An empty string | A 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 |
TrackingCode | string | An empty string | Generated code by the delivery company | False |
PosId | string (max length: 32 characters) | An empty string | POS 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).