VivaPayments / API

Index of Viva Wallet open source projects on GitHub.
138 stars 163 forks source link

Transaction vanishes after (automatic) refund #2487

Closed fmarchalemisys closed 5 months ago

fmarchalemisys commented 5 months ago

When a VW pos app payment is immediately refunded (see #2486), the second webhook announcing the refund must call the api to double check the transaction status and make sure the webhook is genuine.

Unfortunately, the api can't find the payment.

I tried to call Retrieve transaction by order code and Retrieve transaction by transaction id.

Calling /checkout/v2/isv/transactions/980254ae-5893-460d-8602-290e64258577?merchantId=51… returns http status 404.

Calling /api/transactions/?ordercode=4034108572274634 returns http status 200 with a json payload containing no transaction.

{
  "Transactions": [],
  "ErrorCode": 0,
  "ErrorText": null,
  "TimeStamp": "2024-02-05T14:16:06.6517029+02:00",
  "CorrelationId": null,
  "EventId": 0,
  "Success": true
}

It looks like the payment never existed in the first place.

Moreover, in your web interface, we can't find any trace of the refunded transaction. Not by order code, not by transaction id, not by amount, not by date. The payment completely vanished.

Is there an api or parameter to pass to the api to see those payments?

Is there some way we can coerce your web interface into showing those payments?

VivaWalletCustomerSupport commented 5 months ago

Hello @fmarchalemisys,

Thank you for your message and apologies for the late response. As we mentioned in https://github.com/VivaPayments/API/issues/2486 this is a reversal transaction.

Reversed transaction are not visible. Kindly note that when a transaction begins from the card terminal, during data transmission, the transaction completes a cycle. The transaction cycle starts from the terminal, passes through the intermediary banking institutions, from the cardholder's bank and ends again, at the terminal. Then the terminal prints the successful transaction receipt.

If the cycle is not closed, then the transaction is not completed successfully, and the card is not charged – but maybe the amount is committed. Once the terminal communicates after a while with all the banking systems it will be released. This happened to the transactions of yours. This is why it is important to always check if the terminal printed the transaction (email or SMS as well), since the terminal prints or sends receipts only if the cycle is completed.

Kind regards, Viva Wallet E-commerce Support Team

fmarchalemisys commented 5 months ago

Hi @VivaWalletCustomerSupport ,

I discarded the transaction reversal webhooks because no trace of the transaction ID could be found with the api or in the web interface. It took us a few months to notice those spurious refunds belonged to real payments for which we had accepted (and processed) an earlier Transaction Payment Created webhook!

Is there no way to see the transaction with a "system refund" or "failed" status?

It would help greatly to see the failed transaction at any time in the future once you have advertised the transaction ID to the world.

Not being able to view the transaction in your web interface is damageable to both our reputation and your reputation because we show those transactions to the merchant in our own payment interface (in ISV mode) and the merchant can't find them in your web interface.

VivaWalletCustomerSupport commented 5 months ago

Hello @fmarchalemisys,

Thank you for your message. We would recommend contacting your sales rep. to inform about a possible solution regarding reversed payments affected by a timeout.

Kind regards, Viva Wallet E-commerce Support Team