Square Online Orders Creation

Hi, I’m currently trying to create online orders for my restaurant and I am having some success. I first create a customer via the API. This works and when I search for this customer I am able to view them on my customer page. But I then try to create an order for this customer with order lines. I get a 200 response and an order is created, yet when I try to search for the order I’m unable to find it. When I find the customer, the order is not connected to it. But when I search for the order via the API I am able to find it. Is there something I am missing for the orders to show up?

: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
Order-Ahead Application Use Case

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.

It sounds like you’re doing everything correctly in terms of creating the customer and the order. However, to link an order to a customer, you need to include the customer_id in your CreateOrder request. This will associate the order with the specific customer.

Also, please note that orders made from a Square Online store might not immediately be associated with a customer. This process is asynchronous and might take some time to update the customer information when viewed on the Transactions page in Square Point of Sale or the Seller Dashboard.

If you’re still having trouble, you might want to check if the customer_id you’re using in your CreateOrder request matches the id of the customer you created. If these IDs don’t match, the order won’t be associated with the correct customer.

This answer was reviewed by @Bryan-Square.

I do have the customer_id in the create order request. I just created a “payment” with the order and now the customer is showing frequent items purchased. I still don’t see the order in “Square Online Orders” but I’ll have to see if its send to the POS tomorrow when I’m at the restaurant. I do see a “transaction” now for the customer, the items, and the payment. Will this then show up on the POS?

This is for square for restaurant, so ideally I would want the order to come in through square online orders. So I could then print the order to the kitchen. I guess if the order shows up I can then re-print? But if it has a payment I’m not sure if it will show up…

Does the order have a fulfillment? Only orders that have a fulfillment and are fully paid for will show in the Order Manager on the POS and Dashboard. :slightly_smiling_face:

Hi Bryan, thanks for your help! I added the fulfillment and then having it fully paid, then the order went through.

Great! Glad to hear that it’s working as expected. :slightly_smiling_face: