Skip to content

feat(cards): rename cardholderId to customerId on the cards API - #933

Closed
whoisglover wants to merge 1 commit into
eng-11645-docs-cleanupfrom
eng-11645-customer-id
Closed

feat(cards): rename cardholderId to customerId on the cards API#933
whoisglover wants to merge 1 commit into
eng-11645-docs-cleanupfrom
eng-11645-customer-id

Conversation

@whoisglover

@whoisglover whoisglover commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Jira: ENG-11645

What this does

Every other Grid resource names the owning customer customerId, including CardTransaction. The card resource, the issue-a-card request, and the GET /cards filter called the same thing cardholderId. This PR renames that field to customerId so the cards API uses one name.

This is a hard rename with no alias. No external platform has called POST /cards yet, so the change ships without a new API version.

Changes

  • Card and CardCreateRequest: cardholderId becomes customerId, required as before.
  • GET /cards: the cardholderId query parameter becomes customerId.
  • card.state_change webhook examples, the cards quickstart, issuing, funding-sources, webhooks, and sandbox pages use the new name.
  • Grid CLI: --cardholder-id becomes --customer-id on cards list and cards create.

The word "cardholder" stays in prose where it means the person. The CARDHOLDER_KYC_NOT_APPROVED error code is unchanged.

What has to land with this

The server, the dashboard, the observatory card canaries, and the generated Python client read the old name today. Those changes go in webdev and observatory PRs that merge in the same window as this one.

Verification

make build and make lint pass. cd cli && npm ci && npm test passes, 80 tests. A repo-wide grep for cardholderId, cardholder-id, and cardholder_id returns nothing.

@vercel

vercel Bot commented Sep 10, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

2 Skipped Deployments
Project Deployment Actions Updated
grid-flow-builder Ignored Ignored Preview Sep 10, 2026 3:44pm UTC
grid-wallet-demo Ignored Ignored Preview Sep 10, 2026 3:44pm UTC

Request Review

@whoisglover

Copy link
Copy Markdown
Contributor Author

@greptile review

@github-actions

github-actions Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

This PR will update the grid SDKs with the following commit messages.

cli
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

**go**
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

kotlin
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

**openapi**
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

php
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

**python**
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

ruby
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

**typescript**
⏳ (generating...)```
feat(cards): rename cardholderId to customerId on the cards API

Edit this comment to update them. They will appear in their respective SDK's changelogs.

grid-typescript studio
grid-openapi studio
grid-ruby studio
grid-kotlin studio
grid-go studio
grid-python studio
grid-php studio
grid-cli studio

⏳ These are partial results; builds are still running.


This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-09-10 15:55:21 UTC

@greptile-apps

greptile-apps Bot commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

RetriggerConfidence Score: 4/5

The PR is not yet safe to merge because the breaking cards API rename remains on the existing versioned contract.

Findings

  1. P1 Breaking rename lacks versioning
Fix with agent prompt
### Issue 1
openapi/components/schemas/cards/CardCreateRequest.yaml:undefined-3
This hard rename removes the required `cardholderId` request and response fields and the existing list filter while keeping the API on the same `2025-10-13` server path. Existing clients targeting that version can send invalid create requests, fail to deserialize cards, or silently receive unfiltered lists. This violates the repository directive that breaking changes must bump `info.version` and use a matching new `servers.url`; introduce the rename under a new API version.

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

  • Renames the required field on card creation and card resources.
  • Renames the card-list query filter and corresponding CLI option.
  • Updates card examples and documentation to use the new field name.
  • The previously reported API-versioning issue remains outstanding: this is still a hard breaking rename under the existing 2025-10-13 API version and server path.

Reviews (2) · Last reviewed commit: "feat(cards): rename cardholderId to cust..."

type: object
required:
- cardholderId
- customerId

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Breaking rename lacks versioning

This hard rename removes the required cardholderId request and response fields and the existing list filter while keeping the API on the same 2025-10-13 server path. Existing clients targeting that version can send invalid create requests, fail to deserialize cards, or silently receive unfiltered lists. This violates the repository directive that breaking changes must bump info.version and use a matching new servers.url; introduce the rename under a new API version.

Context Used: CLAUDE.md (source)

Prompt To Fix With AI
This is a comment left during a code review.
Path: openapi/components/schemas/cards/CardCreateRequest.yaml
Line: 3

Comment:
**Breaking rename lacks versioning**

This hard rename removes the required `cardholderId` request and response fields and the existing list filter while keeping the API on the same `2025-10-13` server path. Existing clients targeting that version can send invalid create requests, fail to deserialize cards, or silently receive unfiltered lists. This violates the repository directive that breaking changes must bump `info.version` and use a matching new `servers.url`; introduce the rename under a new API version.

**Context Used:** CLAUDE.md ([source](https://github.com/lightsparkdev/grid-api/blob/main/CLAUDE.md))

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

@whoisglover
whoisglover force-pushed the eng-11645-docs-cleanup branch from 4fa2fe8 to e4c24ee Compare September 10, 2026 15:43
@whoisglover

Copy link
Copy Markdown
Contributor Author

@greptile review

@whoisglover

Copy link
Copy Markdown
Contributor Author

Superseded by #937, which landed the same rename on main this morning.

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