Credit card declined/ Payment confirmation failed

I have a customer who has tried to purchase a product several times.
Once they finished filling in the form they received no feedback at all.

Looking at the developer logs and the abandoned carts I can see several log entries with either
Credit card declined or Payment confirmation failed. All entries were within a two hour period.

There are entries in the ‘abandoned carts’ section of the dashboard matching the developer log entries.

I have recommended that the customer check his credit card validity with his supplier etc etc.

However I am concerned that the customer did not receive any feedback about these failures. Surely everyone involved would be better off if the customer were told that their payment had failed.

I also have logged a similar problem about 18months ago.

There is a mention elsewhere about adding a webhook to handle errors .
It starts with “Configure a webhook in Snipcart to trigger on checkout errors.”

The list of webhooks does not include a checkout errors - or any errors? so I would appreciate some help on handling checkout and payment errors.

Thanks,
Anita Graham

Hi Anita. I assume you are using one of the built-in payment methods from Snipcart, right? If yes, you should talk to the official support about this.

Before I continue, let me say this: I am not sure that webhooks are the right way to go about your problem. As it seems, most of the problems your clients are having are on the client side. Before any orders get posted to Snipcart in the first place that is. You are probably better off looking at the JavaScript API here.

As for the webhooks, by definition - or nature - however you want to call it - things can get complicated fast. First, make sure to secure your webhook handlers as by the documentation here. Next, Snipcart’s webhooks are quite sparse in “types” but for most things you want to do with webhooks, they are sufficient. The order success or failure property you have to extract from the data sent to the webhook. That is the part where it can get complicated.

By experience, things also depend on the payment processor you are using. Some handle payments synchronously, some don’t and thus, the webhooks behave differently. It’s probably easiest to setup a webhook listener in your test environment which just logs everything that comes in. Then, you simulate successful and failed payments and see what gets logged.