mollie / mollie-api-node

Official Mollie API client for Node
http://www.mollie.com
BSD 3-Clause "New" or "Revised" License
231 stars 63 forks source link

Querying transaction from webhook notification returns error #295

Closed mdwt closed 1 year ago

mdwt commented 1 year ago

Hi there,

This is regarding webhook notifications for successful payments.

When querying the transaction ID received in a webhook notification we sometimes receive a "404 not found" error, although the payment does exist and was successful - hence the webhook. We're using https://api.mollie.com/v2/payments/*id* to query the payment.

The query works after a while.

What is the cause of the error and how can we prevent it? The webhook should only be fired when the payment exists correct?

Pimm commented 1 year ago

The get payment endpoint should be able to return the payment immediately after it has been created through the create payment endpoint. In my experience, this is always the case.

When did you start noticing this issue?

Am I correct that you're calling the endpoints directly, rather than using this client (mollieClient.payments.get/mollieClient.payments.create)?

mdwt commented 1 year ago

Yes I'm creating the payment calling https://api.mollie.com/v2/payments directly. Would using the client make any difference?

I've seen this happening a few times now for subscription payments - so where sequenceType=first - happened yesterday for one of my clients.

Is there something I'm missing for subscription card payments?

Pimm commented 1 year ago

Using this client should not cause nor fix such issues. This is, however, the issue tracker specifically for the Node.js client, hence the question.

I'm afraid you will have to contact support. If you've only started experiencing this issue since yesterday, let them know that.