question

vadique avatar image
vadique asked mikhail edited

Zero Value (total amount) Order status change OPEN->PAID

Hi there!


Use-case for e-comm API


- We have items that have $0.00 value that can be added to an e-comm order (gifts/comps/promos) which need to show up in reporting.

- We can create an e-comm order with such zero-amount items, and then use a valid payment "token" to "pay" for the order.

- If an order has ONLY zero-amount items, it will remain in "OPEN" state, even though Payment Type gets set to "Paid in Full" and it is not possible to "force" update state to "PAID" via API. The items from such orders (open state) do not show up in sales reports.

- However IF an order has an item that is non-zero amount AND items that are $0.00, then the order gets closed (PAID) and all items show up in sales reporting including $0.00 items


--update--

I verified that on POS (device) I can create a $0.00 item, add it to an order, and then pay (card/cash). The order is then set to Closed/Paid


I also verified that on POS (device) I can open a previously submitted ecomm order for $0.00, and addpayment/pay. The order is then set to Closed/Paid.


Please adivse:
- $0.00 eComm order should be Closed/Paid if a valid token used to pay for it via API - this would match the POS/Device behavior.

- Ability to set "PAID" status via API for $0.00 eComm order.



Order with zero-value item only. This order can not be "closed/paid" and item will not show up in reporting.


Order with zero-value item + another non-zero-value item. This order can be closed and ALL items will show up in reporting.


How can we close/finalize an order with $0 total?

Orderse-commerce api
ecom1.png (199.1 KiB)
ecom2.png (207.0 KiB)
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

vadique avatar image
vadique answered vadique commented

Seriously, 5 days no answer?


2 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

I will write up a issue for ecomm. What API are you using to create the order?

0 Likes 0 ·
vadique avatar image vadique David Marginian ♦♦ commented ·

See answer #2 above

0 Likes 0 ·
vadique avatar image
vadique answered David Marginian Deactivated commented

David:

Here's the flow for all orders using EComm API:
- User selects items enters the card and clicks "pay"


- Obtain payment token via iFrame eComm implementation ( a user always enters a valid card even for $0.00 order, so we always get a payment token)

const clover = new Clover({merchant_mapi_key});clover.createToken()....


- Create Order (may contain ONLY $0.00 items, OR a mix of $0.00 and >$0.00 items)
POST: scl.clover.com/v1/orders (or sandbox endpoint)

{
    "currency": "usd",
    "email": "***",
    "name": "asd asdf",
    "items": [
      {
        "quantity": 1,
        "amount": 0,
        "description": "test comp zero val item"
      }
    ]
}


>> Order created success {ORDER-ID}
>> (This is always successful regardless of $0.00 or non $0.00 items)
>> Response:

{
  id: 'S2D8KKSD38222',
  object: 'order',
  currency: 'usd',
  created: 1602475777000,
  email: '****',
  items: [
    {
      type: 'sku',
      quantity: 1,
      description: 'test comp zero val item'
    },
    { type: 'tax', description: 'Taxes (included)' }
  ],
  status: 'created'
}


- Pay for order with the token (source)
POST: scl.clover.com/v1/orders/{ORDER-ID}/pay (or sandbox endpoint)

>> This is always successful returned as PAID
Response:

    {
  id: 'S2D8KKSD38222',
  object: 'order',
  currency: 'USD',
  charge: 'HWA4THTD05CMP',
  created: 1602475777000,
  ref_num: '1750003256',
  items: [ { quantity: 1, description: 'test comp zero val item' } ],
  source: {
    address_zip: '12312',
    brand: 'VISA',
    exp_month: '02',
    exp_year: '2022',
    first6: '424242',
    last4: '4242'
  },
  status: 'paid',
  status_transitions: { paid: 1602475777758 }
}



The expectation is that the PAID eComm order should be always CLOSED to match the POS behavior. If the order contains at least one non-zero value item - the behavior seems to be correct (order closed).

However, if the order contains only $0.00 item(s) - it remains OPEN. It can not be closed via api.clover.com/orders status update, but It can be closed from device->orders->addPayment manually.

5 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

David Marginian avatar image David Marginian ♦♦ commented ·

Thanks, I created an issue for the ecomm team.

0 Likes 0 ·
vadique avatar image vadique David Marginian ♦♦ commented ·

Hi David. Any update on this?

0 Likes 0 ·
David Marginian avatar image David Marginian ♦♦ vadique commented ·

No, I have created the issue and will be notified of any changes. Unfortunately, I don't anticipate this being resolved soon.

0 Likes 0 ·
Show more comments
mikhail avatar image
mikhail answered mikhail edited

hi. Are there any updates on the issue since 2020? Is it possible to create closed/paid zero-total orders?

10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community