Skip to content

Add end-user terms consent customer APIs - #798

Merged
bsiaotickchong merged 4 commits into
mainfrom
07-31-AT-5718-end-user-terms-api
Aug 5, 2026
Merged

Add end-user terms consent customer APIs#798
bsiaotickchong merged 4 commits into
mainfrom
07-31-AT-5718-end-user-terms-api

Conversation

@bsiaotickchong

@bsiaotickchong bsiaotickchong commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Summary

  • add the full optional endUserTermsConsent object to customer create, update, and response schemas
  • expose the current Grid-hosted terms URL and version through GET /customers/end-user-terms
  • remove the redundant dedicated customer-consent GET/PATCH operations and the hasAcceptedEndUserTerms boolean
  • document consent requirements for unregulated platforms and the END_USER_TERMS_NOT_ACCEPTED quote error
  • identify terms versions sequentially (V1, then V2, V3, …)

Validation

  • make lint

Requested by @bsiaotickchong

Original PR: #788

bsiaotickchong and others added 2 commits August 3, 2026 17:53
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>
@vercel

vercel Bot commented Aug 4, 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 Aug 5, 2026 12:10am
grid-wallet-demo Ignored Ignored Preview Aug 5, 2026 12:10am

Request Review

Copy link
Copy Markdown

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

@github-actions

github-actions Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

✱ Stainless preview builds for grid

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

cli

feat(api): add end user terms methods and consent field to customers

go

feat(api): add end user terms consent methods and fields to customers

kotlin

feat(api): add end user terms methods and consent fields to customers

openapi

feat(api): add end user terms consent/retrieval endpoints and fields to customers

php

feat(api): add end user terms methods, endUserTermsConsent param, hasAcceptedEndUserTerms field

python

feat(api): add end-user terms consent methods/fields to customers

ruby

feat(api): add end user terms methods/models/fields to customers

typescript

feat(api): add end-user terms endpoints and consent tracking to customers
⚠️ grid-openapi studio · code

Your SDK build had at least one "warning" diagnostic.
generate ⚠️

grid-ruby studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-go studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

go get github.com/stainless-sdks/grid-go@6ab0044dc8e4ed584351efe198956df6d34bf565
⚠️ grid-kotlin studio · code

Your SDK build had a failure in the test CI job, which is a regression from the base state.
generate ⚠️build ✅lint ✅test ❗

⚠️ grid-python studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ❗

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

Your SDK build had at least one "note" diagnostic.
generate ✅lint ✅test ✅

grid-typescript studio · conflict

Your SDK build had at least one note diagnostic.

⚠️ grid-cli studio · code

Your SDK build had a failure in the build CI job, which is a regression from the base state.
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-08-05 20:29:15 UTC

@greptile-apps

greptile-apps Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Greptile Summary

The PR extends the customer API contract with End User Terms discovery and consent-management capabilities.

  • Adds endpoints to retrieve current terms and retrieve or update customer consent.
  • Allows consent evidence during customer creation and exposes consent status on customer responses.
  • Updates generated OpenAPI bundles, Stainless resource mappings, webhook examples, error codes, and onboarding disclosures.

Confidence Score: 5/5

The 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.

Important Files Changed

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]
Loading

Reviews (1): Last reviewed commit: "Use sequential End User Terms version id..." | Re-trigger Greptile

Co-Authored-By: bsiaotickchong <bsiaotickchong@users.noreply.github.com>
@ls-bolt

ls-bolt Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Refactored the contract per review: consent is now embedded in customer create/PATCH/GET responses as the full endUserTermsConsent object. The dedicated consent GET/PATCH operations and hasAcceptedEndUserTerms boolean are removed. Also added END_USER_TERMS_NOT_ACCEPTED to the documented quote 403 errors. make lint passes.

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:

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.

should we a description like "this is required if youre an unregulated platform. transactions for this customer will fail if not provided.

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.

nice ya basically whatevers in the guide in case people dont read that

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.

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>
@bsiaotickchong
bsiaotickchong merged commit c3241e3 into main Aug 5, 2026
12 checks passed
@bsiaotickchong
bsiaotickchong deleted the 07-31-AT-5718-end-user-terms-api branch August 5, 2026 20:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants