URGENT BUG - invoice webhook payload and object doesn't include order_id anymore

Hey there,

Our webhooks started failing because the invoice object payload doesn’t include the order_id anymore. Neither do we get it when retrieving the invoice via the api. This happens not on all invoices but yes on many of them. I can share ids privately with square personnel.

Thanks,
Ronen

Are these invoices that we’re created from the Dashboard? Currently invoices that were created from the Dashboard won’t expose the order_id till the invoice is paid for. :slightly_smiling_face:

No, from the api. And everything worked until recently.

Question - if the invoice has been created via the api but modified in the dashboard, can it be that you started removing the order_id after it has been modified in the dashboard?

Hey @Bryan-Square , any news on this?

Do you have an example invoice_id that we can look into? :slightly_smiling_face:

Yes, sent you privately.

Also, another bug - webhooks are being called twice, even though webhook logs are showing only one call - specifically the payment.created event is called twice and payload is EXACTLY the same. Sent you privately an example of that too.

Please feel free to share any of the values requested in this forum post. The only values that’s not safe to share is the access token.

Where did you get this application ID sandbox-sq0idb-iKaL0GY_L13b75J0K2qgsw? It’s not associated to the merchant ID you provided MLD1CJYKQQGAK. Also the invoice you provided is a production invoice that was created in the Square seller Dashboard. When an invoice is created in the Dashboard the order_id isn’t available till the invoice is paid for.

Also for the double webhook events I checked our internal logs and they’re showing it only sent once. If you send a test webhook event from the Developer Dashboard do you get one or two events? :slightly_smiling_face:

Hey @Bryan-Square ,

Regarding order_id issue, I will look for an invoice id that 100% was created via the api. Will post here once I find one.

Regarding webhooks being called twice - it happens in both production and sandbox environments, and I gave you a sandbox example. The app id I gave you was the sandbox environment. When I send a webhook test event, I get it only once. Here a screenshot of the data I sent you privately from the webhook logs in the sandbox env.

Okay, the application_id sandbox-sq0idb-iKaL0GY_L13b75J0K2qgsw that’s in the payload of the webhook is actually a Square application ID cause the invoice was created in the Dashboard instead of your application via the API. :slightly_smiling_face:

@Bryan-Square no it’s not. The fact that your system marks an invoice as created via the dashboard - is 100% a bug on your end, we do not create sandbox invoices via the dashboard, ever. Can you please treat this accordingly, instead of this back and forth so we can resolve this?

Also repeating here again what I clearly stated in my previous message - the problem I reported regarding the sandbox invoice is that webhooks are being called twice, not order id issues. And as I stated in my previous message, no, this doesn’t happen in a test webhook, so our servers are fine. Again - 100% a problem on your end.

Hey @rbabayoff, apologies if I’m missing some context here — not sure if I missed something that was sent via DM. Were you able to find an invoice_id to investigate that was created via API?

Regarding the webhooks issue, what application ID is your webhook subscription set up on?

A workaround to this issue is to add a payment of $1 or something small. Then the order_id will be attached to the invoice if it was created on the dashboard.