8000 fix: Support sole_prop in account.business_type by smihica · Pull Request #687 · arlyon/async-stripe · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix: Support sole_prop in account.business_type #687

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

smihica
Copy link
@smihica smihica commented Mar 31, 2025

Summary

Hi.
Recently, In my Stripe webhook, sometimes "sole_prop" is set for account.business_type.
It's undocumented but may be a change in Stripe's specifications.

Update 2025-05-11

Recently, in Stripe webhooks, account.business_type is sometimes set to “corporation” in addition to “sole_prop”.
It's also undocumented. Stripe seems to be completely unpredictable.

I checked the Open API Spec again.

account.bisiness_type is like the following

"business_type": {
  "description": "The business type.",
  "enum": [
    "company",
    "government_entity",
    "individual",
    "non_profit"
  ],
  "nullable": true,
  "type": "string",
  "x-stripeBypassValidation": true
}

I found a dubious setting x-stripeBypassValidation: true.
Maybe it means that validation should be skipped because another value can be entered.
So I added support for UNKNOWN type, so that undocumented values can enter and not cause an error.

This code is working well so far in my production environment.

Checklist

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.

1 participant
0