POST /CheckOut2Api/Commerce/PurchaseOrder
The method allows partners to invoice a customer. A call to this method should be performed on delivery of the purchased items. The items submitted in the call will be enlisted on the invoice as individual invoice lines. Items with both positive and negative (rebates) value are supported as long the total amount is positive. The Reseller order ID passed in a request will be used to identify the transaction.
Input Parameters
Name | Data Type | Default Value | Description |
---|---|---|---|
ExternalId | String | None. Must be specified. | An ID acquired when initializing a Check-Out session. |
Items | Class List of Items | None. At least one item must be specified. | A list of items representing the individual rows on an invoice. Individual items may have a negative value but the total sum of all items must be positive. |
OrderReference | String | None. Must be specified. | An ID that identifies the order for which the purchase is to be made. |
TranId | String (max. length 36 characters) | An empty string | A random unique ID generated by the calling party that identifies the HTTP request. Although the property isn’t strictly required , we recommend to generate a new random GUID and pass it. Technically, it can be any string. |
TrackingCode | String | An empty string | Generated code by delivery company. |
PosId | 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. |
Example request
Return Value
If successful, the method returns a HTTP status code 200 (OK) with no additional content.
Not successful, the method will return HTTP status code 400 and error description in body.
Error Messages
Purchase denied – insufficient Customer Balance Item description must be specified and must not be longer than 35 characters or empty. Operation denied – ExternalId is incorrect. Purchase is not in completed state Purchase denied – insufficient Customer Balance Duplicity order error Invalid or missing external ID. Sum of items has to be positive amount.