Question

Generate draft orders with line items in Square using Webhook by Zapier

  • 30 November 2023
  • 1 reply
  • 61 views

 

Hi,

I am desespartly trying to create "Draft orders" in Square as an Order ID  is required to créate an invoice in Square.

 

Create a “Draft order”  is not currenly avaliable in Zapier. We can only create "paid Order" but no "Draft order".

 

 

 

I have tried to get this done using the " Post in Webhook by Zapier" app.

I first tried to use the "Post"  event…

 

 

 

but it has not worked as I need to put Line items data and that they do not seem to be supported.

 

 

 

Here a screenshot of a “draft order “ test request I have sent using Square API Explorer and for which I got a 200 response ( I also test my request with Postman and it worked too) : 

 

 

The following Zapier guide explains that we can send Line-Items data with " Post in Wehbhook by Zapier" app using the “Custom Request” method :     

 

 

So I have tried to implement step by step  what is explained on that guide.
  
I first made sure to get on a previous step of my zap all the data I need to send to the API call.

 

 

 

Just do not know what to do from there. 

Here are the main challenge for me  with using the “Custom resquest” event to call the Square order Api.

 

 

Challenge  N°1 :

How can I dynamcly generate  the right code here as the amount of items in my orders  will be different from an order to the other.

 

Challenge N°2 :


How should I handle the "base_price_money" property in my Api call ? Indeed all the other line iteam are value /pairs 

exemple : 

"quantity": "1",

but the base_price_money use another format  :

 

"base_price_money": {
"amount": 45,
"currency": "EUR"
}

  

thanks in advance for your help.

 

Note : if we found a solution I believe it will be usefull to share it with the users who struggle like me with creating invoices in Square: 

 


This post has been closed for comments. Please create a new post if you need help or have a question about this topic.

1 reply

Userlevel 7
Badge +14

Hi @Joel LAMBOURDIERE 

Good question.

Square API endpoint to reference: https://developer.squareup.com/reference/square/invoices-api/create-invoice

Some options:

  • Ask ChatGPT for help configuring the POST request step.
  • If you need help, consider hiring a Certified Zapier Expert: https://zapier.com/experts