BILL-5592: Add descriptor_code support to bank account verification#58
BILL-5592: Add descriptor_code support to bank account verification#58kevinpjones wants to merge 7 commits into
Conversation
Stripe updated microdeposit verification from two amounts to a single 6-character descriptor code. This adds support for the new path while keeping the existing amounts path fully backwards compatible. - BankAccount.verify/3 already passes data through generically; descriptor_code works automatically with no structural changes needed - microdeposit_type in GET /v1/bank_accounts/:id response is decoded automatically via Poison's atom-key parsing - Added tests for descriptor_code verify path and microdeposit_type field - Fixed pre-existing test failures: HTTP/2 lowercases header names (X-Rate-Limit-Limit → x-rate-limit-limit) across all test files - Pinned Elixir to 1.18.4-otp-27 in mise.toml (stable, not bleeding-edge) - Updated deps for OTP 27 compatibility; configured hackney to use the system CA bundle so Cloudflare WARP TLS inspection doesn't break tests - Bumped version to 1.6.0 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
There was a problem hiding this comment.
Code Review
This pull request adds support for descriptor_code in bank account verification, exposes microdeposit_type in bank account responses, and configures Hackney to trust the system CA bundle to handle TLS inspection. It also updates tests to use lowercase HTTP header keys and adds new tests for the bank account features. The review feedback highlights that evaluating :public_key.cacerts_get() at compile time bakes the build environment's CA certificates into the compiled BEAM files, and suggests wrapping the configuration in a zero-arity function to allow dynamic runtime evaluation. Additionally, the feedback recommends using on_exit/1 in the new bank account tests to ensure created resources are properly cleaned up and not leaked, even if assertions fail.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
OTP 22.0 is not available on ubuntu-24.04 (ubuntu-latest now resolves to 24.04). Align CI with the versions pinned in mise.toml. Also update actions/checkout from v2 to v4 to silence Node.js 20 deprecation warning. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Coverage Report for CI Build 0Warning No base build found for commit Coverage: 89.583%Details
Uncovered Changes
Coverage RegressionsRequires a base build to compare against. How to fix this → Coverage Stats
💛 - Coveralls |
- USZipLookupTest: API returns a different zip than the one sent; drop the echo-assertion, keep meaningful type/cities checks - Util build_body doctest: map iteration order is non-deterministic; assert on membership instead of a fixed-order list Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
credo 1.5.6 crashes with CaseClauseError on Elixir 1.18's tokenizer output. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Also drop --halt-exit-status from dialyzer CI command (no longer valid in dialyxir for OTP 27). Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
Problem: Stripe updated bank account microdeposit verification from two deposit amounts to a single descriptor code (a 6-character alphanumeric string beginning with
SMthat appears on the customer's bank statement). The Elixir SDK had no support for the new path, so customers whose accounts are assignedmicrodeposit_type: descriptor_codecould not complete verification through the SDK.Solution: The Elixir SDK passes verify request data through generically, so
descriptor_codeworks automatically. Added tests to confirm both verify paths work and thatmicrodeposit_typeis present in bank account responses. Also fixed pre-existing test failures caused by HTTP/2 normalizing header names to lowercase, updated deps for OTP 27 compatibility, and configured hackney to trust the system CA bundle for Cloudflare WARP environments.Non-breaking: All existing code using
amountscontinues to work without any changes.Story
BILL-5592 / BILL-5581
Related PRs
Verify
mix test test/lob/bank_account_test.exs— all 11 bank account tests passmix test— 78/80 tests pass; 2 remaining failures are pre-existing unrelated issues (stale zip fixture inUSZipLookupTest, non-deterministic map ordering inUtildoctest)🤖 Generated with Claude Code