question

anayooleru avatar image
anayooleru asked parquet76 edited

I need to add customer, during the order creation process.

I need to test my webhook for order CREATE not UPDATE, with customer data on it.

Orders
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
victormccormicke avatar image
victormccormicke answered parquet76 edited

Make sure you have a server or endpoint ready to receive the webhook notifications. The endpoint should be capable of handling incoming data.

Popeyes Survey

3 comments
10 |2000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

anayooleru avatar image anayooleru commented ·
I receive web-hook notifications/events already. What I am talking about now is customer details on a CREATE order web-hook event. It doesn't include customer details. It only returns with customer on UPDATE event, I need to understand why?
0 Likes 0 ·
bryanvargas avatar image bryanvargas ♦♦ anayooleru commented ·

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



If 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.

0 Likes 0 ·
parquet76 avatar image parquet76 bryanvargas ♦♦ commented ·

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.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Welcome to the
Clover Developer Community