Skip to content

docs: mark customer email/phoneNumber conditionally required#748

Closed
ls-bolt[bot] wants to merge 1 commit into
mainfrom
07-26-AT-5971-customer-contact-fields-conditionally-required
Closed

docs: mark customer email/phoneNumber conditionally required#748
ls-bolt[bot] wants to merge 1 commit into
mainfrom
07-26-AT-5971-customer-contact-fields-conditionally-required

Conversation

@ls-bolt

@ls-bolt ls-bolt Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

This PR has been claimed. The active PR is now #749.

Summary

CustomerCreateRequest lists email and phoneNumber as flatly optional, but a customer in a region that verifies a contact channel before identity verification cannot be created without that channel's value — POST /customers rejects the request with INVALID_INPUT. The spec gave integrators no way to know that, so an EU onboarding that omits phoneNumber fails against a contract that says it's optional.

Documents the conditional requirement on both fields, as a region requirement.

Changes

  • openapi/components/schemas/customers/CustomerCreateRequest.yaml — expanded email and phoneNumber descriptions
  • openapi.yaml, mintlify/openapi.yaml — rebundled via make build

Description-only: no schema shape, type, or requirement-list change, so generated clients are unaffected and no version bump is needed. make lint-openapi passes (0 errors).

Requested by @jklein24

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

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

2 Skipped Deployments
Project Deployment Actions Updated (UTC)
grid-flow-builder Ignored Ignored Preview Jul 26, 2026 9:30pm
grid-wallet-demo Ignored Ignored Preview Jul 26, 2026 9:30pm

Request Review

akanter commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions

github-actions Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

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

cli

chore(internal): regenerate SDK with no functional changes

go

docs(api): clarify email and phone requirements in customer create parameters

kotlin

docs(api): clarify email/phoneNumber requirements in customer create requests

openapi

docs(api): clarify email and phoneNumber requirements in customer model

php

docs(api): clarify email and phoneNumber requirements in customer create requests

python

docs(api): clarify email/phone_number requirements in customer create params

ruby

docs(api): clarify email and phone_number requirements in customer create requests

typescript

docs(api): clarify email/phoneNumber requirements in customers create requests

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

grid-typescript studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/09fab056fe1fd5211f85cc464046cef035baf4d8/dist.tar.gz
grid-ruby studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ✅test ✅

grid-openapi studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️

grid-go studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@0c181b7fd090a455e18050f42fbc3821e31f4b31
grid-kotlin studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ✅lint ✅test ❗

grid-python studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅build ✅lint ❗test ❗

pip install https://pkg.stainless.com/s/grid-python/55fbe969bb99ea7850e6739ad395b2f6d1800fd9/grid-0.0.1-py3-none-any.whl
grid-php studio · code · diff

Your SDK build had at least one "note" diagnostic, but this did not represent a regression.
generate ✅lint ✅test ✅

grid-cli studio · code · diff

Your SDK build had at least one "warning" diagnostic, but this did not represent a regression.
generate ⚠️build ❗lint ❗test ❗


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-07-26 21:35:33 UTC

@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟢 Ready View Preview Jul 26, 2026, 9:16 PM

format: email
description: Email address for the customer.
description: >-
Email address for the customer. **Required when the customer's payment

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.

Don't mention "payment provider" in docs. Grid is the payment provider. Just say it's a region-based requirement

@ls-bolt ls-bolt Bot Jul 26, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good call — done. Both fields now describe it as a region requirement with no mention of a provider:

Email address for the customer. Required in regions that verify the email address before identity verification (e.g. the EU); optional otherwise.

Phone number for the customer in strict E.164 format. Required in regions that verify the phone number before identity verification (e.g. the EU); optional otherwise.

One thing your rule catches that's outside this diff: Customer.contactVerification already says "Only present when the customer's payment provider requires it (e.g. EU customers)" — that's the wording I copied from. Happy to fix it in this PR as a one-liner if you want it consistent; left it alone for now to keep the diff to the two fields.

description: >-
Phone number for the customer in strict E.164 format.
Phone number for the customer in strict E.164 format. **Required when the
customer's payment provider requires phone verification** (e.g. EU

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.

Same here

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Same fix applied here — phoneNumber now reads "Required in regions that verify the phone number before identity verification (e.g. the EU); optional otherwise."

Both fields are optional on CustomerCreateRequest, but a customer whose
payment provider verifies a contact channel before identity verification
cannot be created without that channel's value — the request is rejected
with INVALID_INPUT. Say so on the fields, matching the wording already
used for the provider-conditional contactVerification object.

Co-Authored-By: jklein24 <[email protected]>
@mintlify

mintlify Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
Grid 🟡 Building Jul 26, 2026, 9:15 PM

jklein24 added a commit that referenced this pull request Jul 27, 2026
## Summary

`CustomerCreateRequest` lists `email` and `phoneNumber` as flatly
optional, but a customer in a region that verifies a contact channel
before identity verification cannot be created without that channel's
value — `POST /customers` rejects the request with `INVALID_INPUT`. The
spec gave integrators no way to know that, so an EU onboarding that
omits `phoneNumber` fails against a contract that says it's optional.

Documents the conditional requirement on both fields, as a region
requirement.

## Changes

- `openapi/components/schemas/customers/CustomerCreateRequest.yaml` —
expanded `email` and `phoneNumber` descriptions
- `openapi.yaml`, `mintlify/openapi.yaml` — rebundled via `make build`

Description-only: no schema shape, type, or requirement-list change, so
generated clients are unaffected and no version bump is needed. `make
lint-openapi` passes (0 errors).

Requested by @jklein24


Original PR: #748

Co-authored-by: jklein24 <[email protected]>
@jklein24
jklein24 deleted the 07-26-AT-5971-customer-contact-fields-conditionally-required branch July 27, 2026 00:54
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.

2 participants