I need to test my webhook for order CREATE not UPDATE, with customer data on it.
I need to test my webhook for order CREATE not UPDATE, with customer data on it.
Make sure you have a server or endpoint ready to receive the webhook notifications. The endpoint should be capable of handling incoming data.
I am not 100% following what you are looking for. what endpoint are you using to create the order and have you explored all of our endpoints on order creation and play around with the webhook services? From our Clover Docs on webhooks this is the only information that returns:
objectId
: <key of event type>:<event object ID>
type
: CREATE
, UPDATE
, or DELETE
ts
: Current Unix time. Format: millisecondsIf you are looking to get customer details for the order you need to use the get order endpoint and expand on customer.
{baseUrl}/v3/merchants/{mId}/orders/{orderId}?expand=customers
You should be able to work some code logic to run this API once the webhook is returned.
The question is confusing. The issue isn't the webhook, it is that the atomic order endpoint (assuming the poster is using this) doesn't support associating a customer to an order. A subsequent API call needs to be made to update the order with the associated customer. So, at the time the create hook fires there will never be an associated customer. @AnayoOleru perhaps you can explain why this is a problem or what you are trying to accomplish? You should be able to easily work around this limitation in the API.
7 People are following this question.