Connect required verification information

From michaeldouglas/alura-llama-factory · View interactive version

Connect required verification information is an AI agent skill from the GitHub repository michaeldouglas/alura-llama-factory. Use this skill when the user asks what information a Stripe Connect connected account must provide for verification, onboarding, KYC, or account requirements; when they need to compare requirements between connected-account setups; or when they ask which verification fields, documents, or business d

How to use this skill

Skill file

Instructions

The human-accessible version of this documentation allows the user to select connected account fields and regions using a form, and then makes API requests to fetch and display the requirements a connected account with the selected configuration and region must provide. Follow these instructions to fetch the same information.

Interaction contract

Terminology used in this document:

Every time you ask the user to provide a value for a field:

Hard rules

You must follow these rules:

Internal fields -> External language

| Internal field | External language |

| --- | --- |

| apiVersion | Accounts API version |

| platformCountry | Platform country |

| accountCountry | Account country |

| dashboardType | Dashboard type |

| tosType | Service agreement |

| legalEntityType | Business type |

| businessStructure | Business structure |

| capabilities | Capabilities |

| orrProgram | Requirements update |

| eu2025 | Europe |

Dependency chain

You must follow this dependency chain exactly:

flowchart TD
  apiVersion["apiVersion"] --> capabilities
  platformCountry --> accountCountry["accountCountry"]
  accountCountry --> dashboardType["dashboardType"]
  accountCountry --> tosType["tosType"]
  accountCountry --> legalEntityType["legalEntityType"]
  legalEntityType --> businessStructure["businessStructure (optional)"]
  accountCountry --> capabilities["capabilities"]
  accountCountry --> orrProgram["orrProgram (only if returned)"]
  tosType --> capabilities
  apiVersion --> capabilities
  dashboardType --> finalRequest["final requirements request"]
  apiVersion --> finalRequest
  platformCountry --> finalRequest
  accountCountry --> finalRequest
  tosType --> finalRequest
  legalEntityType --> finalRequest
  businessStructure --> finalRequest
  capabilities --> finalRequest
  orrProgram --> finalRequest

Interpret the diagram literally:

Inputs you eventually need

By the time you make the final requirements request, you must have validated values for all of the following fields:

You also must have asked for the following optional fields, if they’re applicable:

Resolve capabilities

Use this algorithm whenever you build or validate the capability list:

  1. Start from country_map[accountCountry].capabilities.
  2. Apply tosType rules:
  1. If apiVersion=v2, drop any capability not present in get-v2-supported-v1-capabilities.
  2. Show the user the filtered capability list. When the user explicitly asks about a filtered-out capability, clearly explain that the asked-for capability is unavailable for the current setup.
  3. If the filtered list is empty, tell the user that no capabilities are supported for the current setup and ask them to revise earlier setup choices using the Interaction contract before making the final requirements request.
  4. When asking about capabilities, print the full filtered list first, then ask a multiple-choice question that includes the most likely choice or choices based on prior user context.
  5. If the user asks for a capability outside the filtered list, explain why it is unavailable for the current setup.

Agent flow

When the user asks what verification information they need, use this flow:

  1. Ask for apiVersion. Recommend v2.
  2. Fetch https://docs.stripe.com/_endpoint/get-platform-countries and use the public supported list to ask for platformCountry.
  3. Fetch https://docs.stripe.com/_endpoint/get-v2-supported-v1-capabilities if apiVersion=v2.
  4. Fetch https://docs.stripe.com/_endpoint/get-requirement-selections-for-platform-country?platformCountry=... with the chosen platformCountry.
  5. Ask for accountCountry from the returned country_map keys.
  6. After accountCountry is validated, ask for:
  1. After legalEntityType is chosen, ask for businessStructure if the validated structure map exposes it.
  2. Resolve and ask for capabilities using Resolve capabilities.
  3. Ask for orrProgram only if the validated setup exposes one or more public programs.
  4. If the user’s requested setup doesn’t match the valid options, tell them exactly which parts are invalid or auto-adjusted, then ask the correcting follow-up using the Interaction contract. Keep the mismatch visible, keep the setup grounded in the user’s request, and continue with a structured follow-up question.
  5. Only after the setup is valid, call https://docs.stripe.com/_endpoint/get-requirements-for-setups with one top-level setup key account-setup-A[...], including account-setup-A[apiVersion], account-setup-A[platformCountry], account-setup-A[accountCountry], account-setup-A[dashboardType], account-setup-A[tosType], account-setup-A[legalEntityType], optional account-setup-A[businessStructure], one or more account-setup-A[capabilities][i], and optional account-setup-A[orrProgram].
  6. At the end, you must call https://docs.stripe.com/_endpoint/get-website-requirements-for-capabilities?capabilities[i]=... and https://docs.stripe.com/_endpoint/get-mcc-restrictions-for-capabilities?capabilities[i]=... with the final validated capabilities to check for additional information.

If you are asked to compare two setups or are asked what is needed to update from X to Y, you must follow the validation flow for setup A with a top-level account-setup-A[...] key and then follow the flow again for setup B with a second top-level key account-setup-B[...] before calling the diffable requirements request.

Treat transport or build failures as retryable helper failures, and reserve unsupported-setup conclusions for successful prerequisite fetches and business validation results.

curl examples

In these examples, set the docs host to the public site:

DOCS_HOST="https://docs.stripe.com"
Naive user: “What do I need to verify for a Stripe connected account?”

Ask for apiVersion. Recommend v2.

Fetch the public platform-country list:

curl --get "$DOCS_HOST/_endpoint/get-platform-countries"

Ask the user which platformCountry value they want to use. Then, fetch the allowed options for that platform country. This request tells you what is valid next, and you must use it before choosing downstream fields. For example, if the user chose US:

curl --get "$DOCS_HOST/_endpoint/get-requirement-selections-for-platform-country" \
  --data-urlencode "platformCountry=US"

After that response returns, collect setup choices as described in the Agent flow section.

Smart user: “I have a CA platform, and I want to onboard a FR company connected account to use card payments”

Ask for apiVersion. Recommend v2.

# Step 1: verify the platform country is valid
curl --get "$DOCS_HOST/_endpoint/get-platform-countries"

# Step 2: fetch all public options for that platform country
curl --get "$DOCS_HOST/_endpoint/get-requirement-selections-for-platform-country" \
  --data-urlencode "platformCountry=CA"

From that second response, first verify that FR is a valid account country, then read:

Then, confirm the user’s requested setup actually matches those available options.

If the user wants apiVersion=v2, first fetch and apply the v2 capability filter to compare against the user’s requested capabilities:

curl --get "$DOCS_HOST/_endpoint/get-v2-supported-v1-capabilities"

Only when the user’s requested setup actually matches those available options, then call the requirements endpoint.

The requirements endpoint expects nested query-string fields, not a JSON body:

curl --get "$DOCS_HOST/_endpoint/get-requirements-for-setups" \
  --data-urlencode "account-setup-A[apiVersion]=v2" \
  --data-urlencode "account-setup-A[platformCountry]=CA" \
  --data-urlencode "account-setup-A[accountCountry]=FR" \
  --data-urlencode "account-setup-A[dashboardType]=none" \
  --data-urlencode "account-setup-A[tosType]=full" \
  --data-urlencode "account-setup-A[legalEntityType]=company" \
  --data-urlencode "account-setup-A[businessStructure]=corporation" \
  --data-urlencode "account-setup-A[capabilities][0]=card_payments"

Optionally, since .programs is present for this configuration, you can ask the user if they would like to choose a requirements update and add --data-urlencode "account-setup-A[orrProgram]=eu-2025" to the request.

Use this response to present the requirements to the user as explained in the Construct the result section.

Fetch the optional supplemental tables for the selected capabilities:

curl --get "$DOCS_HOST/_endpoint/get-website-requirements-for-capabilities" \
  --data-urlencode "capabilities[0]=card_payments"
curl --get "$DOCS_HOST/_endpoint/get-mcc-restrictions-for-capabilities" \
  --data-urlencode "capabilities[0]=card_payments"

Read the API responses

Use get-platform-countries to choose your initial platformCountry:

Use get-requirement-selections-for-platform-country to validate the setup before you call the main requirements endpoint:

Apply these dependency rules before making the final request:

Use get-requirements-for-setups as your main source of requirement data:

Within each successful setup result:

Check the supplemental endpoints to see if there are any additional capability-specific restrictions to present to the user.

Construct the result

Transform the API response into one or more human-readable tables in your own reply to the user, followed by any additional explanatory notes. These are output tables that you construct from the response data, not references to pre-existing tables on the human docs page.

How to construct the tables:
  1. Split each raw field key into a section using its prefix:
  1. Render one table per non-empty section. Do not merge multiple sections into one table.
  2. For each table:
  1. If two sections share the same row-definition family, they still remain separate tables. For example, representative and owners both use the person row-definition family, but they render as separate Representative and Owners tables because they are different sections.
  2. Assign each section to one of the row-definition families listed below in the Row definitions step. The row-definition family only controls how rows are matched and labeled inside that section’s table:
  1. For every non-account section, strip the section prefix before matching row rules. For example, match representative.first_name as first_name and company.address.city as address.city.
  2. Use the row definitions below for that section’s row-definition family. Create a row only when at least one field in that section matches the row.
  3. Row definitions:

account: Merchant category code: /business_profile.mcc/ URL: /business_profile.(url|requirement)/ Product description: /business_profile.product_description/ Support phone: /business_profile.support_phone/ Statement descriptors: /settings.payments.statement_descriptor/

entity: Company name: /name$/ Company name (kana): /name_kana/ Company name (kanji): /name_kanji/ Company address: /address\..*/ Company address (kana): /address_kana/ Company address (kanji): /address_kanji/ Company phone: /phone/ Company tax ID: /tax_id/ Company registration number: /registration_number/ Company ID number: /id_number/ Trade license: /company_license/ Memorandum of Association: /company_memorandum_of_association/ Proof of bank account: /bank_account_ownership_verification/ Directors provided: /directors_provided/ Owners provided: /owners_provided/ Executives provided: /executives_provided/

person: Name: /(first|last)_name/ Name (kana): /(first|last)_name_kana/ Name (kanji): /(first|last)_name_kanji/ Aliases: /full_name_aliases/ Date of birth: /dob\./ Address: /^address\./ Address (kana): /address_kana/ Address (kanji): /address_kanji/ Registered address: /registered_address/ Email: /email/ Phone: /phone/ Gender: /gender/ Political Exposure: /political_exposure/ Tax information: /ssn_last_4$/ or /id_number$/ Secondary ID number: /(id_number_secondary)/ Job title: /(relationship\.title)/ Relationship with legal entity: /relationship\.(?!title)/ Nationality: /nationality/ Passport: /passport/ Proof of liveness: /proof_of_liveness/

  1. For apiVersion=v2, replace each displayed field with v2_field_name and use v2_alternatives.
  2. If apiVersion=v2 and a requirement doesn’t expose v2_field_name, omit that field from the rendered table. If that removes every field from a row group, omit the row. If a section becomes empty, omit that section table.
How to construct the JSON-style summary:

```json

{

"requirements": {

"currently_due": [

"configuration.merchant.mcc",

"company.name",

"representative.first_name"

],

"eventually_due": [

"business_profile.url"

]

}

}

```

Do not use ellipses (...) or placeholder strings in the output — list every field name explicitly.

How to respond to users

When you return results to the user:

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.