docs: use collectData.schema as source of truth for native UI, deprecate fields - #98
docs: use collectData.schema as source of truth for native UI, deprecate fields#98jakubuid wants to merge 2 commits into
Conversation
|
Preview deployment for your docs. Learn more about Mintlify Previews.
💡 Tip: Enable Workflows to automatically generate PRs for you. |
…ate fields Wallets building native data-collection UI were rendering forms from the deprecated collectData.fields array, which only lists name and date of birth — missing required fields like country (surfaced in Atom Wallet QA). - Add "Building Native UI Instead" guidance to the shared WebView snippet (all 8 mobile SDK pages) and inline to both web SDK pages: parse schema (properties, required, anyOf), never the deprecated fields array - Remove deprecated fields usage from Flutter, React Native, and Web example code - Mark schema as the native-UI source of truth in every CollectDataAction data model, with a deprecation warning for fields - Clarify confirmPayment examples: collectedData is for native UI only, built from schema; omit it when using the WebView/iframe flow - Expand native-form guidance in the API-first guide and wallets overview FAQ - Update AI-prompt pages so generated integrations never use fields Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
78bc278 to
330a410
Compare
| Do **not** pass `collectedData` to `confirmPayment()` when using the embedded form. The form handles data submission directly. | ||
| </Warning> | ||
|
|
||
| ### Building Native UI Instead |
There was a problem hiding this comment.
"Build Native UI instead" appears as a section inside "Embedded Data Collection Form", and also its above "Webview message types", which looks weird in the side bar. Check in the preview link
There was a problem hiding this comment.
Good catch — fixed in ba578b4. The section was rendering at the end of the shared snippet, so it landed inside "Embedded Data Collection Form" and above "WebView Message Types" on every page. Folded it into an <Accordion> instead: the guidance stays in place but no longer emits a TOC entry, so the sidebar now flows straight from "Customizing the form appearance" to "WebView Message Types".
The "Building Native UI Instead" heading rendered in the on-page TOC nested under "Embedded Data Collection Form" and above "WebView Message Types", splitting the embedded-form docs (PR feedback). An accordion keeps the guidance in place without a TOC entry. Also say "embedded form" instead of "WebView flow" — the snippet is shared with the web pages, where the form is an iframe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Summary
Atom Wallet QA (Slack thread) surfaced that wallets building native data-collection UI render forms from the deprecated
collectData.fieldsarray, which only lists name and date of birth — required fields like country never appear. The correct source iscollectData.schema(JSON Schema:properties+ top-levelrequired+ conditionalanyOfgroups). The docs recommended the WebView flow but never spelled this out for integrators who build native UI anyway.This PR makes the guidance explicit across all platforms and integration types.
flowchart TD A[Option selected with collectData] --> B{UI approach} B -- "Recommended" --> C[Display collectData.url in WebView/iframe] C --> D[IC_COMPLETE → confirm WITHOUT collectedData] B -- "Native UI" --> E[Parse collectData.schema<br/>properties + required + anyOf] E --> F[Confirm WITH collectedData built from schema] B -. "Never" .-> G[❌ deprecated collectData.fields<br/>incomplete — misses country etc.]Changes
snippets/webview-data-collection-overview.mdx, included by all 10 SDK pages — standalone + WalletKit × Kotlin/Swift/Flutter/React Native/Web): new Building Native UI Instead section — parseschema(properties,required,anyOf, validation constraints,tosConfirmed), submit viacollectedData, with a<Warning>thatfieldsis deprecated and incompleteCollectDataActiondata model now labelsschemaas the native-UI source of truth (urlas the recommended WebView flow), with a deprecation warning forfieldsbeneath each model — visible where devs look when their IDE autocompletes the deprecated propertyrequired+anyOfparsing) plus deprecation warning — the raw API response still containsfieldsfieldsdeprecationfieldspayments/psps/headless-sdk/implementation.mdx): theInformationCaptureexample rendered a KYC form fromcollectData.fields— now renders fromschemawith the deprecation note (headless integrations always build their own UI, so this mattered most)No API reference changes needed — the OpenAPI specs already mark
fieldsasdeprecated: true.🤖 Generated with Claude Code