BTI-21: Instant refunds for iDEAL and Payconiq#14
Merged
Conversation
vildanbina
commented
Jul 14, 2026
Collaborator
- Fixes instantRefund() for iDEAL and Payconiq. It was broken: it never sent the original transaction key or the credit amount, so no refund could happen. It now builds a proper refund request (OriginalTransactionKey + AmountCredit) and keeps the instantRefund action.
- Supports partial refunds via refund_amount, full refund by default, and raises a clear error when the original transaction key is missing.
- refund() and instantRefund() now share one request builder so they stay in sync.
- Adds wire-level and failure tests for both methods, a runnable example, and a README section.
- Checked against live Plaza (test mode): the SDK sends the correct request and Plaza runs the full instant-refund flow. A green result needs an account with Verification of Payee working; the sandbox VOP service errors out, so a live success is not reachable there.
- fix instantRefund() to send OriginalTransactionKey + AmountCredit (refund-shaped body) instead of a Pay-shaped request - extract shared _build_refund_request_data() helper reused by refund() and instantRefund() - support partial refunds via refund_amount; raise ValueError when the original transaction key is missing - strengthen assert_instant_refund_returns_success to assert OriginalTransactionKey + AmountCredit on the wire - add wire-level and failure-flow tests for iDEAL and Payconiq instant refunds - add examples/instant_refund.py demoing iDEAL + Payconiq instant refunds - document instant refunds in README
AlbinaBaraliu
approved these changes
Jul 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.