Skip to content

BTI-21: Instant refunds for iDEAL and Payconiq#14

Merged
vildanbina merged 2 commits into
developfrom
BTI-21-instant-refunds
Jul 14, 2026
Merged

BTI-21: Instant refunds for iDEAL and Payconiq#14
vildanbina merged 2 commits into
developfrom
BTI-21-instant-refunds

Conversation

@vildanbina

Copy link
Copy Markdown
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
@vildanbina vildanbina merged commit 03008a9 into develop Jul 14, 2026
10 of 11 checks passed
@vildanbina vildanbina deleted the BTI-21-instant-refunds branch July 14, 2026 08:41
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

Successfully merging this pull request may close these issues.

2 participants