Quantcast
Channel: Square Developer Forums - Latest topics
Viewing all articles
Browse latest Browse all 1326

Creating a Zapier publish invoice webhook receiving error

$
0
0

After following the directions in your Developer Invoice Publish documentation I am receiving a Bad request. (HTTP Status Code: 400)

I am also confused as there are two uids below. Are these supposed to be left alone as default or do they correspond to the order id and invoice id? if so, which one is which?
Second, am I required to have everything below to publish or is there a minimum?

And finally, are dates supposed to be formatted in a specific manner or is 2024-05-07 acceptable?

URL POST:
https://connect.squareup.com/v2/invoices/0-ChBMLI5zIMOOYVCQtJ6HsuGhEPoN/publish

{
“version”: 1,
“location_id”: “LJNVC96B0Z4M4”,
“order_id”: “CAISENgvlJ6jLWAzERDzjyHVybY”,
“payment_requests”: [
{
“uid”: “2da7964f-f3d2-4f43-81e8-5aa220bf3355”,
“request_type”: “BALANCE”,
“due_date”: “{{238616178__Date_ISO8601}}”,
“tipping_enabled”: false,
“reminders”: [
{
“uid”: “beebd363-e47f-4075-8785-c235aaa7df11”,
“relative_scheduled_days”: -1,
“message”: “Your invoice is due prior to scheduling QA”,
“status”: “PENDING”
}
],
“computed_amount_money”: {
“amount”: 15000,
“currency”: “USD”
},
“total_completed_amount_money”: {
“amount”: 0,
“currency”: “USD”
},
“automatic_payment_source”: “NONE”
}
],
“invoice_number”: “{{_GEN_1715056892428__invoice number}}”,
“title”: “Set Up Fee”,
“description”: “One time setup free to access webinar materials!”,
“scheduled_at”: “2030-01-13T10:00:00Z”,
“status”: “SCHEDULED”,
“timezone”: “America/Los_Angeles”,
“created_at”: “{{_GEN_1715056892430__invoice__created_at}}”,
“updated_at”: “{{_GEN_1715056892430__invoice__updated_at}}”,
“primary_recipient”: {
“customer_id”: “{{_GEN_1714979117595__id}}”,
“given_name”: “{{_GEN_1714979117595__given_name}}”,
“family_name”: “{{_GEN_1714979117595__family_name}}”,
“email_address”: “{{_GEN_1714979117595__email_address}}”,
“phone_number”: “{{238616178__PhoneNumber}}”
},
“public_url”: “Square}”,
“accepted_payment_methods”: {
“card”: true,
“square_gift_card”: false,
“bank_account”: false,
“buy_now_pay_later”: false,
“cash_app_pay”: false
},
“custom_fields”: [
{
“label”: “Event Reference Number”,
“value”: “Ref. #{{_GEN_1715056892428__invoice number}}”,
“placement”: “ABOVE_LINE_ITEMS”
},
{
“label”: “Terms of Service”,
“value”: “The terms of service are…”,
“placement”: “BELOW_LINE_ITEMS”
}
],
“delivery_method”: “EMAIL”,
“sale_or_service_date”: “{{238616178__Date1_ISO8601}}”,
“store_payment_method_enabled”: false
}
}

2 posts - 2 participants

Read full topic


Viewing all articles
Browse latest Browse all 1326

Trending Articles