Skip to content

fix(paysafe): don't send a card accountId on wallet settle - #2067

Open
shuklatushar226 wants to merge 2 commits into
mainfrom
fix/paysafe-wallet-settle-account-id
Open

fix(paysafe): don't send a card accountId on wallet settle#2067
shuklatushar226 wants to merge 2 commits into
mainfrom
fix/paysafe-wallet-settle-account-id

Conversation

@shuklatushar226

Copy link
Copy Markdown
Contributor

Description

A connector-tokenized wallet settle reaches the account-resolution match in PaysafePaymentsRequest as PaymentMethod::Card — the gRPC token payment method maps to Card, so the wallet identity survives only in payment_method_type.

It therefore fell into the Card arm and resolved card.<CURRENCY>.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:

5068 — fieldErrors: [{ "field": "accountId",
  "error": "Value does not correspond with the accountId in payment handle" }]

This restores the rule already documented directly above that match — wallet settles send NO accountId, because the payment handle carries its own account binding. The wallet CIT arm is deliberately untouched: a vaulted CONVERTED handle has no binding, so it still resolves an explicit account.

Reproduction

Sandbox Google Pay payment with authentication_type: three_ds (pay_fz979retzyGT3PRkk2GW):

  • Tokenize → handle minted on account 1002671400, status: PAYABLE, tokenType: GOOGLE_PAY
  • Settle → POST /paymenthub/v1/payments carried accountId resolved from card.USD.three_ds = 1003047440
  • Paysafe → 5068, payment FAILED

Confirmed independently against the Paysafe API with Hyperswitch excluded: minting a handle on 1002671400 and settling with accountId: 1003047440 returns the identical fieldError.

Verification

  • cargo check -p connector-integration passes.
  • Verified directly against Paysafe that a Google Pay handle settles successfully with no accountId in the /payments body — USD 1.00, authCode 149723, status: COMPLETED on account 1002671400. EUR was likewise charged earlier on 1003044460 (authCode 727050).

No automated test added — the behaviour is only observable in the outgoing Paysafe body for a tokenized wallet settle, which the current unit-test harness for this connector doesn't cover.

🤖 Generated with Claude Code

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.<CURRENCY>.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) <noreply@anthropic.com>
@shuklatushar226
shuklatushar226 requested a review from a team as a code owner August 5, 2026 12:01
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.
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.

1 participant