Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Register
  • Sign in
  • A Ahad Mobile
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Terraform modules
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • holatech
  • Ahad Mobile
  • Merge requests
  • !107

fix(fiat-payout): send bank account category to airwallex

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Khanh Pham requested to merge fix/fiat-payout-account-category into develop Oct 08, 2026
  • Overview 0
  • Commits 2
  • Pipelines 1
  • Changes 13

Why

On staging, adding a bank account for a USD withdrawal failed with 422 BENEFICIARY_REJECTED. Airwallex POST /api/v1/beneficiaries/create returned validation_failed on beneficiary.bank_details.bank_account_category: the field is required for US ACH beneficiaries, and we did not send it.

Probing /api/v1/beneficiaries/validate on the sandbox, which creates nothing:

  • missing → 400;
  • CHECKING → 400 (value_options: ["Checking","Savings"]);
  • Checking → 200;
  • Savings → 200.

The values are case-sensitive.

What

  • BE: CreateBankBeneficiaryDto.accountCategory is required and accepts only CHECKING or SAVINGS. AirwallexPayoutClient maps it to Checking or Savings in bank_details.bank_account_category.
  • FE: "Account type" choice (Checking / Savings, default Checking) on the add-bank screen. The generated model is hand-edited to match the orval output, because staging swagger does not have the field yet.
  • No DB column and no migration: the category is only needed when the beneficiary is created.

Compatibility

App builds that predate this change get a 400 from the new required field. No build with the bank-withdrawal screens has shipped to users, so nothing in the field breaks.

Tests

  • BE: yarn jest src/modules/fiat-payout passes (207 tests). yarn build and eslint are clean.
  • FE: pnpm jest src/components/withdraw passes (47 tests), including a new add-bank screen test. tsc and eslint are clean.
  • Mutation-checked: each new assertion fails when the mapping or the default is broken.

Opus review gate: PASS in round 1, with 0 blocking, 0 should-fix and 3 nits. The nits are parked:

  • the radio pill should use accessibilityState.checked rather than selected;
  • import type for BankAccountCategory;
  • the inline selector is verbose.

After merge

Retest on staging: add a bank account (routing 021000021), withdraw $11, then simulate PAID and FAILED in the Airwallex sandbox.

🤖 Generated with Claude Code

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: fix/fiat-payout-account-category