vippsas/vipps-developers

Fetch a charge may get details about charge failure/problems with status FAILED

kmieciu85 opened this issue · 5 comments

Today we may get a charge info using 'fetch a charge'. It might return different status.
In addition to that will be helpful to change this API or create new one that returns a charge fails/problem description...

Today it only returns FAILED status, and that is all, we dont know why it faills and why we cannot charge a customer...

When I was asked support I get info:

Jeg kan sjekke det for dere denne gangen, men vi har egentlig ikke tid til å gå gjennom charges for å gi dere informasjon på hvorfor det feilet,

In that case I think we need to have a API that returns Problem description like:

  • Card expired
  • Invalid paymentsource
  • ....

In that cases we may do a different actions, and it is good to know what happend.

We get plenty times FAILED status befor becouse yours implementation was wrong, or sometimes Failed on server, or you have disabled user and enabled again and on this sytuation payment source was not attached again....

Today looks like Vipps works OK. so thats is fine, but will be fine to know what goes wrong and do some actions when we get
Card expired or Invalid paymentsource status.

Alternative, additional solution: Will be fine if new status may be returned like ERROR - that is more problem with other cases, not with card payment... so Card expired, Invalid paymentsource may be as FAILED but other errors just marked with status ERROR ??

Hi @kmieciu85

The Recurring API endpoint GET:/v2/agreements/{agreementId}/charges/{chargeId} returns one of these statuses: PENDING, DUE, RESERVED, CHARGED, FAILED, CANCELLED, PARTIALLY_REFUNDED, REFUNDED, PROCESSING: https://vippsas.github.io/vipps-recurring-api/#/Charge%20Controller/getCharge

For failed charges there are some information we receive from the PSP tht we are allowed pass on, and some that we are not allowed to. The eCom API has a list: https://github.com/vippsas/vipps-ecom-api/blob/master/vipps-ecom-api.md#error-codes

I will check with the team if we can provide more details for failed charges.

Please keep in mind that PSD2 is in effect now, and that not all banks or card issuers are quite ready yet. This changes almost daily, and we spend a lot of resources keeping up with the frequent changes. Adding new functionality to the API can not be prioritised over this. See this (in Norwegian) for more details: https://www.vipps.no/om-oss/nyheter/flere-nettbetalinger-far-bankid-bekreftelse-fra-nyttar/

Christian, Vipps

Ok. Thank you for reply. It will be nice if we may get error description/code like it i s in eCom API... Fine if you make a notice on that if you will be working on that (in the future)... Thx .Karol

Hi @kmieciu85

We are working on more informative errors in the Recurring API, so it's deinitely on the list.

Unfortunately there are also other, more important things on the list, such as making sure the functionality also works now that PSD2 is in effect, and that all the functionality we had with our old PSP (Nets) also works with the new PSP (Adyen).

The best way to keep updatred on API cahnges is to "star" the repo, and get automatic updates. We do not have the capacity top keep track of all feature requests and send updates ot everyone, sorry.

Christian, Vipps

Ok. Thx.

Looks like this is allredy done :)
https://vipps.no/developers-documentation/recurring/documentation/#charge-failure-reasons
New changes might have a historic/list of failures, but it is fine as it is now as well :) 👍

Just need to implement that in our code!

Thx, just close this issue.

Karol