Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow same-amount partial refunds through use of idempotencyKey #60

Open
tasosz opened this issue Apr 13, 2020 · 0 comments
Open

Allow same-amount partial refunds through use of idempotencyKey #60

tasosz opened this issue Apr 13, 2020 · 0 comments

Comments

@tasosz
Copy link

tasosz commented Apr 13, 2020

Hi,

I need to be able to initiate multiple partial refunds for same amounts (within minutes/hours of each other), but currently this is prevented.
From the API docs:

If you're doing a partial Refund, note that you can only refund the same amount on the same transaction once per day (this is to prevent unintended duplicate refunds). After 24h you can do another refund of the same amount on the same transaction. If it is a different amount on the same transaction, there is not this limit.
This is a good measure to prevent unintended duplicate refunds.

Here is my example and need:
A buyer has a payment with 5 same items (5xEUR10.00) and initiates a refund of one of them (partial refund - EUR5.00). A few minutes later decides to also return the second one and initiates a second refund (partial refund - EUR5.00).

In this scenario, I can verify I am getting the documented result:
"ResultCode":"005407","ResultMessage":"Duplicated operation: you cannot reimburse the same amount more than once for a transaction during the same day."

However, this is a genuine Business need rather than an accidental refund.
And I have no reliable way to work around this limitation.

I am proposing that I should not be getting a failure when I am using a unique IdempotencyKey for same-amount partial refunds.
I.e. maintain the current "unintended duplicate refunds" protection, but also allow a client system to specify the uniqueness of a partial refund through the use of an IdempotencyKey.
Also, through the use of the IdempotencyKey, the same 24h semantics are maintained:

If you use the same Idempotency Key within 24 hours, we’ll block all but the first one (ie you can rerun your same requests knowing that we’ll only ever treat them once in 24 hours) – this is particularly useful for direct payments.

.
.
.
Related ticket: ref:_00D24JOOb._5001o4QUCmg:ref

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant