Hi there:
Not sure if this is a bug or expected behavior, but the ecommerce payment response scl.clover.com/v1/{order-id}/pay returns items array without quantities
Example:
1. Create 2 inventory items : Apple @ $2.00, Orange @ $3.00
2. Create atomic order for 2 Apples and 3 Oranges ( $4.00 + $9.00 = $13.00) : orderCart has 5 line items (each item individually), and atomic order response has 5 lineItems.elements respectfully
3. Pay for the order via scl.clover.com/v1/orders/{order-id}/pay
4. Payment response contains payment total and items array of just 2 items : one Apple, one Orange without mentions of any quantities, so a sum of item.amount does not equal payment.amount (2+3 <>13)
{ "id" : "RT2WX****", "object" : "order", "amount" : 1300, "amount_paid" : 1300, "currency" : "USD", "charge" : "FVCCG*****", "created" : 1668102006000, "email" : "a******1@gmail.com", "ref_num" : "231400*****", "auth_code" : "002****", "items" : [ { "parent" : "R6WV33****", "inventory_id" : "R6WV33****", "amount" : 200, "description" : "Apple", "tax_rates" : [ { "name" : "NO_TAX_APPLIED" } ] }, { "parent" : "K7G6ME***", "inventory_id" : "K7G6ME***", "amount" : 300, "description" : "Orange", "tax_rates" : [ { "name" : "NO_TAX_APPLIED" } ] } ], "source" : { "address_line1_check" : "pass", "address_zip" : "1****", "address_zip_check" : "pass", "brand" : "VISA", "cvc_check" : "pass", "exp_month" : "08", "exp_year" : "2023", "first6" : "4*****", "last4" : "4****" }, "status" : "paid", "status_transitions" : { "paid" : 1668102007209 }, "external_reference_id" : "E5CZ3*****" }
There is an "expand" field in the docs for /pay, which I'm guessing can provide more details on the payment transaction (e.g. lineItems), but seems default response could contain quantity per item or complete item list.
Note that in the ecommerce docs, there is no info on which fields are available for expansion, just simply says array of strings. https://docs.clover.com/reference/postordersidpay