From 7b8fe0bab52f3d6ff212c4d50e084839d16f2266 Mon Sep 17 00:00:00 2001 From: Tushar Shukla Date: Wed, 5 Aug 2026 17:31:13 +0530 Subject: [PATCH 1/2] fix(paysafe): don't send a card accountId on wallet settle MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A connector-tokenized wallet settle reaches the account-resolution match in `PaysafePaymentsRequest` as `PaymentMethod::Card`, because the gRPC `token` payment method maps to Card — the wallet identity survives only in `payment_method_type`. It therefore fell into the Card arm and resolved `card..three_ds` / `no_three_ds`, while the Tokenize leg had minted the payment handle on the `apple_pay` / `google_pay` account. Paysafe rejects the mismatch with: 5068 - "Value does not correspond with the accountId in payment handle" Reproduced on sandbox with a Google Pay payment at `authentication_type: three_ds`: the handle was minted on account 1002671400 (status PAYABLE, tokenType GOOGLE_PAY) while the settle sent `card.USD.three_ds` = 1003047440. Confirmed against Paysafe directly — minting a handle on 1002671400 and settling with accountId 1003047440 returns the identical fieldError. This restores the rule already documented above the match: wallet settles send NO accountId, because the payment handle carries its own account binding. The wallet CIT arm is untouched — a vaulted CONVERTED handle has no binding, so it still resolves an explicit account. Verified directly against Paysafe that a Google Pay handle settles successfully with no accountId in the /payments body (USD, authCode 149723, COMPLETED). Co-Authored-By: Claude Opus 5 (1M context) --- .../src/connectors/paysafe/transformers.rs | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs b/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs index 2e4036ef7e..221abe7ca3 100644 --- a/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs +++ b/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs @@ -1670,6 +1670,27 @@ impl.three_ds). Wallets follow the rule stated above — the + // handle already carries its account binding, so send NO accountId. The CIT arm + // below still applies, since a vaulted CONVERTED handle has no binding. + enums::PaymentMethod::Card + if matches!( + router_data.request.payment_method_type, + Some(enums::PaymentMethodType::GooglePay) + | Some(enums::PaymentMethodType::ApplePay) + ) && !router_data + .request + .is_customer_initiated_mandate_payment() => + { + None + } enums::PaymentMethod::Card => { if router_data.resource_common_data.is_three_ds() { Some(account_id.get_account_id( From ce3551a7fe4895925a29111f8b018cbf0db2d976 Mon Sep 17 00:00:00 2001 From: "hyperswitch-bot[bot]" <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Date: Wed, 5 Aug 2026 12:21:10 +0000 Subject: [PATCH 2/2] chore: auto-fix formatting and generated code Auto-applied by CI: - cargo +nightly fmt --all - make -C sdk generate (if applicable) - make docs (if applicable) This commit was automatically generated by GitHub Actions. --- .../src/connectors/paysafe/transformers.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs b/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs index 221abe7ca3..815f940928 100644 --- a/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs +++ b/crates/integrations/connector-integration/src/connectors/paysafe/transformers.rs @@ -1685,9 +1685,7 @@ impl + ) && !router_data.request.is_customer_initiated_mandate_payment() => { None }