Webhook Payment API Payload Version

Hello, I am using PHP to interact with the payment API, I am receiving webhooks on payment.update, and everything was good last night. I was receiving very detailed payloads, version 3, with the customer_id I sent to the API when creating the link.

Today, the webhooks are only sending back Version 1 payloads with very little details, and I need that customer_id to tie the payment to my users in my database. How can I ensure I get v3 webhook payloads?

I am using this as my endpoint:

https://connect.squareupsandbox.com/v2/online-checkout/payment-links

:waving_hand: 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

Refunds API Webhooks
Catalog API Webhooks
Use Webhooks to Integrate with a Payroll System

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.

I figured it out. Apparently the “versioning” is not a TYPE of message, but an incremented versioning of the same order_id, with the “version” number incrementing each time data is changed within the payload.

I originally thought that the API system sent out payloads in different FORMAT versions based on some factors that were unknown to me.

I’ve since noticed that the only certainty in all the payloads is the order_id, so I just use that and do all necessary lookups based on it. I can get customer_id and transaction_id through it. Hope this helps anyone that has the same issue.

Glad to hear you figured it out and thank you for sharing your findings. :slight_smile: