Skip to content

Haoxuanxu/add list payment methods route - #343

Merged
haoxuanxu-stripe merged 2 commits into
mainfrom
haoxuanxu/add-list-payment-methods-route
Sep 22, 2026
Merged

haoxuanxu-stripe merged 2 commits into
mainfrom
haoxuanxu/add-list-payment-methods-route

Conversation

@haoxuanxu-stripe

@haoxuanxu-stripe haoxuanxu-stripe commented Sep 17, 2026

Copy link
Copy Markdown
Contributor

Summary

image

Add support for Link balance amounts returned by the payment-details list API.

  • Parse and expose balance_details.available_balance in @stripe/link-sdk
  • Display balance methods as Link balance $12.50 available
  • Avoid rendering ****undefined when a payment method has no card or bank-account details
  • Preserve balance methods when the available amount is unknown
  • Align nullable payment-method fields with the API response
  • Add a patch changeset for @stripe/link-cli and @stripe/link-sdk

Response example

{
  "id": "csmrpd_balance",
  "type": "BALANCE",
  "name": "Link balance",
  "is_default": false,
  "card_details": null,
  "bank_account_details": null,
  "balance_details": {
    "available_balance": {
      "amount": 1250,
      "currency": "usd"
    }
  }
}

CLI output:

csmrpd_balance Link balance $12.50 available

Motivation

The payment-details list can include a Link balance alongside cards and bank accounts. Previously, the SDK did not model its balance details and the interactive CLI assumed every
payment method had a last-four value, resulting in ****undefined.

Test plan

  • SDK: 200 tests passed across 18 test files
  • CLI: 579 tests passed across 45 test files
  • Type checks passed
  • SDK and CLI builds passed
  • pnpm biome check . passed
  • Added focused coverage for known and unavailable balance amounts

Rollout/revert plan

Client-only additive change with no migration required. Safe to revert.

@haoxuanxu-stripe
haoxuanxu-stripe requested a review from a team as a code owner September 17, 2026 19:49
@alwmh7792-del

alwmh7792-del commented Sep 17, 2026 via email

Copy link
Copy Markdown

@haoxuanxu-stripe
haoxuanxu-stripe force-pushed the haoxuanxu/add-list-payment-methods-route branch 3 times, most recently from 3374d85 to 2698393 Compare September 22, 2026 01:03
Committed-By-Agent: codex
Co-authored-by: codex <noreply@openai.com>
@haoxuanxu-stripe
haoxuanxu-stripe force-pushed the haoxuanxu/add-list-payment-methods-route branch from 2698393 to b2b389f Compare September 22, 2026 14:35
@haoxuanxu-stripe
haoxuanxu-stripe merged commit aa6bd92 into main Sep 22, 2026
6 checks passed
@haoxuanxu-stripe
haoxuanxu-stripe deleted the haoxuanxu/add-list-payment-methods-route branch September 22, 2026 14:57
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.

3 participants