Skip to content

Proactively communicate when a transaction is outside the refund window #4778

Description

@daledupreez

Problem

As far as I can tell, we don't have any UI in the order admin screen to indicate when the refund window for a specific transaction will end, or whether a specific transaction is (not) eligible for a refund. Instead, what happens is that we get a Javascript alert with the following text after attempting the refund:

There was a problem initiating a refund: This payment is too old to be refunded. It has passed its 90-day refund window.

(The 90 days in the message above was for Affirm.)

Desired solution

Rather than allowing merchants to perform an action that will fail, it would be much more helpful and less frustrating if we disabled the refund button and included some messaging about the refund window having passed.

Additional context

I can understand that we don't want to hard-code the refund window for every payment method, especially if they're not the same across currencies or countries. So I understand why we attempt the refund optimistically and see what happens, as any data we keep in the plugin could easily be invalidated as the rules change. But we may be able to set this up in such a way that we allow a better default UX and make it possible for something like filters to modify the core rules by default. We might even want to consider ways to allow a default maximum refund window to be specified (though it feels like that ought to happen closer to core rather than just within the Stripe code).

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions