I’m looking to integrate data from a webhook on my website to create an invoice for a client in square...tried everything I can but not sure how to make this work…
Any help / suggestions / anyone I can hire for this?
I’m looking to integrate data from a webhook on my website to create an invoice for a client in square...tried everything I can but not sure how to make this work…
Any help / suggestions / anyone I can hire for this?
Hi
You’ll need to use the Square API to create an invoice: https://developer.squareup.com/reference/square/invoices-api/create-invoice
App APIs can be used in Zaps with the Webhooks action step: https://zapier.com/apps/webhook/integrations#triggers-and-actions
I’m having trouble with this still, I know it’s from the API and tried setting it up What is the URL on square I would need to send the webhook data to? and can I send raw text data from the webhook to square or does it need to be formatted in a special way?
You can reference the API documentation for the posting requirements: https://developer.squareup.com/reference/square/invoices-api/create-invoice
curl https://connect.squareup.com/v2/invoices \
-X POST \
-H 'Square-Version: 2021-05-13' \
-H 'Authorization: Bearer ACCESS_TOKEN' \
-H 'Content-Type: application/json' \
-d '{
"idempotency_key": "ce3748f9-5fc1-4762-aa12-aae5e843f1f4",
"invoice": {
"location_id": "ES0RJRZYEC39A",
"order_id": "CAISENgvlJ6jLWAzERDzjyHVybY",
"scheduled_at": "2030-01-13T10:00:00Z",
"primary_recipient": {
"customer_id": "JDKYHBWT1D4F8MFH63DBMEN8Y4"
},
"delivery_method": "EMAIL",
"payment_requests": :
{
"request_type": "BALANCE",
"due_date": "2030-01-24",
"tipping_enabled": true,
"automatic_payment_source": "NONE",
"reminders": :
{
"message": "Your invoice is due tomorrow",
"relative_scheduled_days": -1
}
]
}
],
"invoice_number": "inv-100",
"title": "Event Planning Services",
"description": "We appreciate your business!",
"accepted_payment_methods": {
"card": true,
"square_gift_card": false,
"bank_account": false
},
"custom_fields": :
{
"label": "Event Reference Number",
"value": "Ref. #1234",
"placement": "ABOVE_LINE_ITEMS"
},
{
"label": "Terms of Service",
"value": "The terms of service are...",
"placement": "BELOW_LINE_ITEMS"
}
]
}
}'
I got to that point but what would I enter into the webhook GET to send the form data and connect to square to create the invoice?
It’s a POST request to “Create Invoice” instead of a GET request. (see screenshot below)
Might make sense to learn about HTTP REST concepts: https://www.w3schools.in/restful-web-services/intro/
If you need help configuring this, consider hiring a Zapier Expert: https://zapier.com/experts
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.