WooCommerce and Square Orders

I am trying to set up a WooCommerce (using Square for WooCommerce plugin) store to be able to take online orders for a food truck. I was able to implement a code snippet to create an Order from WooCommerce orders, but the problem I have is that no matter what I do, the Order shows up as “Completed” in the Square Order Tab. I have tried many different variants with fulfillments. The “Type” is set to pickup. But no matter what I do, the order shows up as “Completed”.

The Order needs to show up as a new order that can still be modified. All I need is for these orders to be able to be marked as “Completed” when the order has been picked up.

Is this even possible with the API? Or is Square just always going to mark these incoming Orders as completed no matter what I do?

:wave: I’m Square Dev AI, here to help answer your question!
Based on the information you’ve provided, the following documentation will help answer your question:

Additional Documentation

Create Orders
Orders API: How It Works
Orders API

If this documentation helped you find a solution, please check the box indicating that this reply solves the problem.
Otherwise one of our Developer Advocates will provide additional assistance shortly.

Yes, it is possible to manage the state of an order using the Square Orders API. When an order is created, its initial state is OPEN. Once the order is paid for, the state changes to COMPLETED. However, if you want to manage the order state manually, you can create a DRAFT order. Orders in the DRAFT state cannot be fulfilled or paid. When the buyer is ready to make the purchase, you can call UpdateOrder to set the order state to OPEN so that the order can be fulfilled or payment can be processed.

In your case, you might want to create the order as a DRAFT, then update it to OPEN when you’re ready to process the order, and finally set it to COMPLETED when the order has been picked up.

Remember, some fulfillment fields can be updated based on the fulfillment state. Developers can use the Orders API to apply limited fulfillment updates, such as updating the state.

This answer was reviewed by @Bryan-Square.

This doesn’t really solve the problem I have. I simply want to do the following:

  1. Customer orders online via WooCommerce store and makes payment (delaying payment to a later time would defeat the whole purpose)

  2. Order details are sent to Square, and a new Order appears in the Orders Tab with a modifiable status

  3. When the customer picks up the order, the person at the POS/Dashboard can manually mark it as “Completed” to indicate that it has been picked up.

Hey @texnev! Can you elaborate on how you’re creating orders? Are you doing this yourself by calling the Orders API, or is this through the WooCommerce plugin?

If you’re using Orders API, this flow is definitely feasible. You can create an order (in an OPEN state) with a fulfillment, then have the customer pay for it. Orders with fulfillment details that have been paid will be pushed to the merchant’s Square Dashboard, where the fulfillment can be marked as completed.

If you are using the Orders API to create the order yourself and are still running into issues, do you mind sharing an example of the CreateOrder request you’re making?