Skip to content

BILL-5585: Add descriptor_code support to bank account verification#247

Merged
kevinpjones merged 4 commits into
mainfrom
BILL-5583-ruby-descriptor-code-verification
Jun 5, 2026
Merged

BILL-5585: Add descriptor_code support to bank account verification#247
kevinpjones merged 4 commits into
mainfrom
BILL-5583-ruby-descriptor-code-verification

Conversation

@kevinpjones

Copy link
Copy Markdown
Contributor

Description

Problem: Stripe's Setup Intents API added a descriptor code-based microdeposit verification path alongside the legacy two-amount path. When a bank account is created via Setup Intents, Stripe sends a single $0.01 deposit whose statement descriptor contains a 6-character code beginning with SM. The Ruby SDK had no support for this path, so customers whose accounts were assigned microdeposit_type: descriptor_code could not complete verification through the SDK.

Solution: Added descriptor_code as an alternative to amounts on BankAccountVerify, updated validation so exactly one of the two fields is required (not both, not neither), and added microdeposit_type to the BankAccount response model so callers can read which verification path applies to a given account before calling verify.

Non-breaking: All existing code using amounts continues to work without any changes.

Story

https://lobsters.atlassian.net/browse/BILL-5585

Related PR's

PHP implementation: lob/lob-php#192

Verify

  • Code runs without errors
  • Tests pass (19 examples, 0 failures)

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.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

kevinpjones and others added 3 commits June 2, 2026 18:17
Postcard List tests were failing because the describe block had no
before(:all) setup, so the test account had no postcards to list.
Added fixture creation (and cleanup) matching the pattern used by
other integration tests (e.g. Letter, Check).

SelfMailer pagination test was failing because 3 items with limit=2
only produces one full page — the second page has 1 item and no
next_url, causing a nil URI parse error. Added 2 more items (5 total)
so two full pages of results exist.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
BankAccountVerify.new now requires exactly one of amounts or
descriptor_code. Updated the two Verify unit tests that were calling
BankAccountVerify.new with no arguments.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kevinpjones kevinpjones merged commit 75ea680 into main Jun 5, 2026
0 of 2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants