paytrail/api-documentation

Ability to cancel an open payment?

mikkorantalainen opened this issue · 1 comments

Issue:

According to https://docs.paytrail.com/#/?id=create one can create a new open payment. However, what should happen if the user then aborts the process? Is it okay to leave the payment open forever on the Paytrail service or is there some method to cancel the payment?

Option 1 to solve the issue:

Add/document a method to cancel an already opened payment.

Option 2 to solve the issue:

Document that leaving payment open is acceptable behavior in case payment is logically cancelled or aborted by the user.

Personal opinion:

If option 2 is acceptable, I think it would be the best for the API because there will always be corner cases where the payment might have been created but not continued (e.g. merchant service crashing or the end user flow status is undecided for a really long time).

There is no method for canceling the payment by the merchant. We will automatically cancel it in about two weeks after the payment has been created so it is ok to leave these open.

Certainly a good point that this could be added to the documentation. Will look into that