Add end-user terms consent customer APIs - #798
Conversation
Co-Authored-By: github-actions <github-actions@users.noreply.github.com> Co-Authored-By: jklein24 <jklein24@users.noreply.github.com>
Start the version identifier at V1 so future revisions increment to V2, V3, and so on, rather than encoding a release date. Co-Authored-By: bsiaotickchong <bsiaotickchong@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub. 2 Skipped Deployments
|
✱ Stainless preview builds for gridThis PR will update the cli go kotlin openapi php python ruby typescript Edit this comment to update them. They will appear in their respective SDK's changelogs. ✅ grid-typescript studio · code · diff
✅ grid-kotlin studio · code · diff
✅ grid-python studio · code · diff
✅ grid-openapi studio · code · diff
✅ grid-ruby studio · code · diff
✅ grid-go studio · code · diff
✅ grid-cli studio · code · diff
✅ grid-php studio · code · diff
This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push. |
Greptile SummaryThe PR extends the customer API contract with End User Terms discovery and consent-management capabilities.
Confidence Score: 5/5The PR appears safe to merge, with the source specification, generated bundles, SDK mappings, examples, and onboarding guidance consistently representing the new consent flow. No concrete blocking or independently actionable non-blocking defect remains after checking the shared customer contracts, alternate customer-creation path, consent schemas, generated outputs, and documentation.
|
| Filename | Overview |
|---|---|
| openapi/components/schemas/customers/EndUserTermsConsentRequest.yaml | Defines the shared timestamp, IP address, terms-version, and acceptance-method evidence accepted during creation and consent updates. |
| openapi/paths/customers/customers_{customerId}_end-user-terms-consent.yaml | Adds authenticated retrieval and update operations for a customer's recorded End User Terms consent. |
| openapi/paths/customers/customers_end-user-terms.yaml | Adds an authenticated endpoint exposing the current terms version and hosted URL. |
| openapi/components/schemas/customers/Customer.yaml | Adds the required read-only hasAcceptedEndUserTerms status to shared customer responses. |
| openapi/components/schemas/customers/CustomerCreateRequest.yaml | Allows individual and business customer creation requests to include consent evidence. |
| .stainless/stainless.yml | Maps the new models and operations into the generated customer SDK resource. |
| mintlify/payouts-and-b2b/onboarding/disclosures.mdx | Documents terms discovery, consent recording, retrieval, version validation, and the unregulated-platform account-opening gate. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[GET current End User Terms] --> B[Present terms to end user]
B --> C{When is consent recorded?}
C -->|During creation| D[POST /customers with endUserTermsConsent]
C -->|After creation| E[PATCH customer consent]
D --> F[Customer response]
E --> F
F --> G[hasAcceptedEndUserTerms]
E --> H[GET recorded consent]
Reviews (1): Last reviewed commit: "Use sequential End User Terms version id..." | Re-trigger Greptile
Co-Authored-By: bsiaotickchong <bsiaotickchong@users.noreply.github.com>
|
Refactored the contract per review: consent is now embedded in customer create/PATCH/GET responses as the full |
| If provided during customer update, the UMA address will be updated to the provided value. This is an optional identifier to route payments to the customer. | ||
| This is an optional identifier to route payments to the customer. | ||
| example: $john.doe@uma.domain.com | ||
| endUserTermsConsent: |
There was a problem hiding this comment.
should we a description like "this is required if youre an unregulated platform. transactions for this customer will fail if not provided.
There was a problem hiding this comment.
nice ya basically whatevers in the guide in case people dont read that
There was a problem hiding this comment.
Added in 18965e9 on both customer create and update schemas. The description now states that unregulated platforms must record consent before customer-scoped transactions and that those transactions fail until consent is recorded. Rebuilt the bundled specs and make lint-openapi passes.
Co-Authored-By: bsiaotickchong <bsiaotickchong@users.noreply.github.com>

Summary
endUserTermsConsentobject to customer create, update, and response schemasGET /customers/end-user-termshasAcceptedEndUserTermsbooleanEND_USER_TERMS_NOT_ACCEPTEDquote errorV1, thenV2,V3, …)Validation
make lintRequested by @bsiaotickchong
Original PR: #788