question

mjones avatar image
mjones asked parquet76 edited

In Need of Silent Post IPN of Some Kind Webhook Maybe?

Okay, hear me out. I was with Payeezy for many years, where this worked seemlessly and effortlessly. Fast forward to today and those days are over. The good news is that, thanks to help in this forum and the sandbox, I have pretty much duplicated my shoping cart system using Clover Hosted Checkout.

But here is the thing. Please indulge me because the best way for me to explain is to decribe how things worked with Payeezy.

Online sales only. The buyer purchases a service by submitting details about the service required. Those details are stored on my server and are not passed on the the team providing the service until we know they have paid. After payment, Payeezy would send a silent post back to an IPN page on my server, automatically releasing the stored data to the team.

That's it. But I am lost at trying to find out how to do that with Clover. I assume it can possibly be handled by the webhook but have no clue how to do it. Again, no POS or apps. Just my simple online hosted checkout sales.

Any and all help is much appreciated.

Webhooks
10 |2000

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

parquet76 avatar image
parquet76 answered parquet76 edited

Have you been able to get a basic redirect working yet? It doesn't look like a good pass. Additional dynamic information with the redirect so you will probably have to rely on a webhook.

10 |2000

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

mjones avatar image
mjones answered parquet76 edited

By redirect, do you mean a page that says "Thanks for your order"? Yes, I have that. Is transaction data sent to that page? If so, that would be great.

Basically, I just need some method to trigger a routine back at my server if the payment is successful.

That sounds like shopping cart 101, but I can't figure out how to pull it off.

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

parquet76 avatar image parquet76 commented ·

Clover isn't building a shopping cart. They just have a simple page that can take a payment. As far as I can tell you are going to need to:

1) Pass an identifier in when you create the checkout, save it in the notes field.

2) Set-up the webhook.

3) when you receive the webhook, check the payload, I am guessing it is going to have an order id on it, you will then have to use the clover rest API to get the order and then grab the note.

I am not very experienced with the hosted checkout so there may be an easier option, I don't know.

0 Likes 0 ·
parquet76 avatar image parquet76 parquet76 commented ·

Based on the docs - https://docs.clover.com/docs/ecomm-hosted-checkout-webhook the webhook will give you the payment id. Make a call to this API - https://docs.clover.com/reference/paygetpayment, and expand on "order" to get the order note you set. Guessing this or something very close will work

0 Likes 0 ·
mjones avatar image mjones parquet76 commented ·
I'm good on steps 1 and 2. It's 3 I can't figure out. It would help if I could get my hands on some sample code for the webhook URL. Do you know of any?
0 Likes 0 ·
parquet76 avatar image parquet76 mjones commented ·

It's not too complicated, you can probably find a generic webhook handler in whatever tech stack/language you are using somewhere on the internet and modify it. It's just a post handler which has access to the http request and then you will parse the request body. (Which will be json).

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